diff options
author | Adam <Adam@anope.org> | 2012-05-17 03:57:19 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-05-17 03:57:19 -0400 |
commit | ccd29085a982651ba344339af2729928973e6b4d (patch) | |
tree | a4de9c2318979b4c0d65facabf1938b25f78cc91 /include/anope.h | |
parent | a883362c149770873c52fa017bb9a1678e737410 (diff) |
reinterpret_cast off of a virtual base does Bad Things
Diffstat (limited to 'include/anope.h')
-rw-r--r-- | include/anope.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/anope.h b/include/anope.h index 88c7eab98..2a51514e0 100644 --- a/include/anope.h +++ b/include/anope.h @@ -589,18 +589,6 @@ template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr) #endif } -template<typename T, typename O> inline T anope_dynamic_reinterpret_cast(O ptr) -{ -#ifdef DEBUG_BUILD - T ret = dynamic_cast<T>(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<T>(ptr); -#endif -} - /*************************************************************************/ /** Class with the ability to keep flags on items, they should extend from this |