From: Gunnar Beutner Date: Fri, 31 Oct 2014 13:34:28 +0000 (+0100) Subject: Remove static_cast optimization for Value's operator shared_ptr X-Git-Tag: v2.2.0~162 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f160eda4799dc1545152623853ab00921056164;p=icinga2 Remove static_cast optimization for Value's operator shared_ptr --- diff --git a/lib/base/value.hpp b/lib/base/value.hpp index e2ce64e59..7a069c963 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -99,14 +99,10 @@ public: if (IsEmpty()) return shared_ptr(); -#ifdef _DEBUG shared_ptr object = dynamic_pointer_cast(boost::get(m_Value)); if (!object) BOOST_THROW_EXCEPTION(std::bad_cast()); -#else /* _DEBUG */ - shared_ptr object = static_pointer_cast(boost::get(m_Value)); -#endif /* _DEBUG */ return object; }