Remove static_cast optimization for Value's operator shared_ptr<T>

This commit is contained in:
Gunnar Beutner 2014-10-31 14:34:28 +01:00
parent 4b89e1b45f
commit 6f160eda47
1 changed files with 0 additions and 4 deletions

View 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;
}