summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-22 12:12:41 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-22 12:12:41 +0100
commit38b22990eae47525f4e8064a29e585a89788ee58 (patch)
tree67795a34e49e9540e7feb0fbb497975778bece11
parent50ea7f41b2e4aca9ef9be31c056f862a7d90609a (diff)
Disable typeid() calls unless INSPIRCD_ENABLE_RTTI is defined
-rw-r--r--src/base.cpp6
-rw-r--r--src/cull_list.cpp6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/base.cpp b/src/base.cpp
index c131f4dae..682899132 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -23,7 +23,9 @@
#include "inspircd.h"
#include "base.h"
#include <time.h>
+#ifdef INSPIRCD_ENABLE_RTTI
#include <typeinfo>
+#endif
classbase::classbase()
{
@@ -34,8 +36,12 @@ classbase::classbase()
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);
+#endif
return CullResult();
}
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index 5cbe3aef3..73f2def51 100644
--- a/src/cull_list.cpp
+++ b/src/cull_list.cpp
@@ -21,7 +21,9 @@
#include "inspircd.h"
+#ifdef INSPIRCD_ENABLE_RTTI
#include <typeinfo>
+#endif
void CullList::Apply()
{
@@ -46,8 +48,12 @@ void CullList::Apply()
classbase* c = list[i];
if (gone.insert(c).second)
{
+#ifdef INSPIRCD_ENABLE_RTTI
ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Deleting %s @%p", typeid(*c).name(),
(void*)c);
+#else
+ ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Deleting @%p", (void*)c);
+#endif
c->cull();
queue.push_back(c);
}