]> granicus.if.org Git - icinga2/commitdiff
Remove static_cast optimization for Value's operator shared_ptr<T>
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 31 Oct 2014 13:34:28 +0000 (14:34 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 31 Oct 2014 13:34:28 +0000 (14:34 +0100)
lib/base/value.hpp

index e2ce64e59d8001281aae379147a073662bf3c706..7a069c963267062ab972f947b4245114fdf01c9f 100644 (file)
@@ -99,14 +99,10 @@ public:
                if (IsEmpty())
                        return shared_ptr<T>();
 
-#ifdef _DEBUG
                shared_ptr<T> object = dynamic_pointer_cast<T>(boost::get<Object::Ptr>(m_Value));
 
                if (!object)
                        BOOST_THROW_EXCEPTION(std::bad_cast());
-#else /* _DEBUG */
-               shared_ptr<T> object = static_pointer_cast<T>(boost::get<Object::Ptr>(m_Value));
-#endif /* _DEBUG */
 
                return object;
        }