X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fbase.cpp;h=83ebe8cab6abdc0dd6c2a9590225a87daf51a03d;hb=007e0b46a82f0aa4ebe47472d0fed63d845107b7;hp=b4ea09bc9b330f6393c0c821ad03e66560cc2788;hpb=703ba72071b970caaa7554b1e58a13def57694dc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/base.cpp b/src/base.cpp index b4ea09bc9..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() @@ -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(old); + free(container, old); } void StringExtItem::unset(Extensible* container) { void* old = unset_raw(container); - delete static_cast(old); + free(container, old); } void StringExtItem::free(Extensible* container, void* item)