]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/base.cpp
Minor improvements to the codepage module.
[user/henk/code/inspircd.git] / src / base.cpp
index b4ea09bc9b330f6393c0c821ad03e66560cc2788..83ebe8cab6abdc0dd6c2a9590225a87daf51a03d 100644 (file)
 
 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()
@@ -369,13 +370,13 @@ void StringExtItem::FromNetwork(Extensible* container, const std::string& value)
 void StringExtItem::set(Extensible* container, const std::string& value)
 {
        void* old = set_raw(container, new std::string(value));
-       delete static_cast<std::string*>(old);
+       free(container, old);
 }
 
 void StringExtItem::unset(Extensible* container)
 {
        void* old = unset_raw(container);
-       delete static_cast<std::string*>(old);
+       free(container, old);
 }
 
 void StringExtItem::free(Extensible* container, void* item)