summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-11-15 12:38:10 +0000
committerPeter Powell <petpow@saberuk.com>2019-11-16 22:05:42 +0000
commitd15e3bd110ea3e53fe1242c7d253bac685d0fca9 (patch)
tree0fb5a1d12941f0e35576adf4c487243dc53167ec /src
parent586abc72dab240bc9e4d6bfd60a53a26f0811422 (diff)
Only show classbase ctor/dtor/cull messages in debug builds.
Diffstat (limited to 'src')
-rw-r--r--src/base.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/base.cpp b/src/base.cpp
index ebd5214db..83ebe8cab 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -29,26 +29,27 @@
classbase::classbase()
{
+#ifdef INSPIRCD_ENABLE_RTTI
if (ServerInstance)
- ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::+ @%p", (void*)this);
+ ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::+%s @%p", typeid(*this).name(), (void*)this);
+#endif
}
CullResult classbase::cull()
{
- if (ServerInstance)
#ifdef INSPIRCD_ENABLE_RTTI
- ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::-%s @%p",
- typeid(*this).name(), (void*)this);
-#else
- ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::- @%p", (void*)this);
+ if (ServerInstance)
+ ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::-%s @%p", typeid(*this).name(), (void*)this);
#endif
return CullResult();
}
classbase::~classbase()
{
+#ifdef INSPIRCD_ENABLE_RTTI
if (ServerInstance)
- ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::~ @%p", (void*)this);
+ ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "classbase::~%s @%p", typeid(*this).name(), (void*)this);
+#endif
}
CullResult::CullResult()