aboutsummaryrefslogtreecommitdiffstats
path: root/src/cull.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cull.cpp')
-rw-r--r--src/cull.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cull.cpp b/src/cull.cpp
index 8513bf84b..f3bcc23db 100644
--- a/src/cull.cpp
+++ b/src/cull.cpp
@@ -25,14 +25,14 @@
#include "inspircd.h"
-#ifdef INSPIRCD_DEBUG
+#ifndef NDEBUG
# include <typeinfo>
#endif
#include <unordered_set>
Cullable::Cullable()
{
-#ifdef INSPIRCD_DEBUG
+#ifndef NDEBUG
if (ServerInstance)
{
ServerInstance->Logs.Debug("CULL", "Cullable::+{} @{}",
@@ -43,7 +43,7 @@ Cullable::Cullable()
Cullable::~Cullable()
{
-#ifdef INSPIRCD_DEBUG
+#ifndef NDEBUG
if (ServerInstance)
{
ServerInstance->Logs.Debug("CULL", "Cullable::~{} @{}",
@@ -54,7 +54,7 @@ Cullable::~Cullable()
Cullable::Result Cullable::Cull()
{
-#ifdef INSPIRCD_DEBUG
+#ifndef NDEBUG
if (ServerInstance)
{
ServerInstance->Logs.Debug("CULL", "Cullable::-{} @{}",
@@ -90,7 +90,7 @@ void CullList::Apply()
auto* c = list[idx];
if (culled.insert(c).second)
{
-#ifdef INSPIRCD_DEBUG
+#ifndef NDEBUG
ServerInstance->Logs.Debug("CULL", "Culling {} @{}",
typeid(*c).name(), (void*)c);
#endif
@@ -102,12 +102,12 @@ void CullList::Apply()
}
else
{
-#ifdef INSPIRCD_DEBUG
- ServerInstance->Logs.Debug("CULL", "BUG: {} @{} was added to the cull list twice!",
- typeid(*c).name(), (void*)c);
-#else
+#ifdef NDEBUG
ServerInstance->Logs.Debug("CULL", "BUG: @{} was added to the cull list twice!",
(void*)c);
+#else
+ ServerInstance->Logs.Debug("CULL", "BUG: {} @{} was added to the cull list twice!",
+ typeid(*c).name(), (void*)c);
#endif
}
}
@@ -115,7 +115,7 @@ void CullList::Apply()
for (auto* c : deletable)
{
-#ifdef INSPIRCD_DEBUG
+#ifndef NDEBUG
ServerInstance->Logs.Debug("CULL", "Deleting {} @{}", typeid(*c).name(),
(void*)c);
#endif