diff options
| author | 2026-04-06 22:00:45 +0100 | |
|---|---|---|
| committer | 2026-04-06 22:02:42 +0100 | |
| commit | 0c701a4ca052cbf3345aee7961d39f4fdce39b7d (patch) | |
| tree | 4d5ab848688d7785818f27d2e0d7d0466931214c /src/cull.cpp | |
| parent | Allow the vendoring script to run build commands. (diff) | |
Define NDEBUG when not building in debug mode.
Diffstat (limited to 'src/cull.cpp')
| -rw-r--r-- | src/cull.cpp | 20 |
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 |
