mirror of https://github.com/Icinga/icinga2.git
Remove static_cast optimization for Value's operator shared_ptr<T>
This commit is contained in:
parent
4b89e1b45f
commit
6f160eda47
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue