From dfff54425b5995f0f4267abbaab7cb420cf18642 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 12 Dec 2012 00:48:46 -0500 Subject: Fixed webpanel fail on nondebug builds --- include/anope.h | 14 +------------- include/extensible.h | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/anope.h b/include/anope.h index 15944e165..30ca48e69 100644 --- a/include/anope.h +++ b/include/anope.h @@ -713,7 +713,7 @@ template inline T convertTo(const Anope::string &s, bool failIfLefto } /** Casts to be used instead of dynamic_cast, this uses dynamic_cast - * for debug builds and static_cast/reinterpret_cast on releass builds + * for debug builds and static_cast on releass builds * to speed up the program because dynamic_cast relies on RTTI. */ #ifdef DEBUG_BUILD @@ -731,18 +731,6 @@ template inline T anope_dynamic_static_cast(O ptr) #endif } -template inline T anope_dynamic_reinterpret_cast(O ptr) -{ -#ifdef DEBUG_BUILD - T ret = dynamic_cast(ptr); - if (ptr != NULL && ret == NULL) - throw CoreException(Anope::string("anope_dynamic_reinterpret_cast<") + typeid(T).name() + ">(" + typeid(O).name() + ") fail"); - return ret; -#else - return reinterpret_cast(ptr); -#endif -} - /*************************************************************************/ /** Class with the ability to keep flags on items, they should extend from this diff --git a/include/extensible.h b/include/extensible.h index 493dc20cf..bd7c8c76d 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -107,7 +107,7 @@ class CoreExport Extensible { extensible_map::const_iterator it = this->extension_items.find(key); if (it != this->extension_items.end()) - return anope_dynamic_reinterpret_cast(it->second); + return anope_dynamic_static_cast(it->second); return NULL; } -- cgit