mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 15:44:11 +02:00
parent
32b0429904
commit
cfc418c9eb
@ -99,12 +99,17 @@ public:
|
|||||||
if (IsEmpty())
|
if (IsEmpty())
|
||||||
return shared_ptr<T>();
|
return shared_ptr<T>();
|
||||||
|
|
||||||
shared_ptr<T> object = dynamic_pointer_cast<T>(boost::get<Object::Ptr>(m_Value));
|
Object::Ptr object = boost::get<Object::Ptr>(m_Value);
|
||||||
|
|
||||||
if (!object)
|
if (!object)
|
||||||
|
return shared_ptr<T>();
|
||||||
|
|
||||||
|
shared_ptr<T> tobject = dynamic_pointer_cast<T>(object);
|
||||||
|
|
||||||
|
if (!tobject)
|
||||||
BOOST_THROW_EXCEPTION(std::bad_cast());
|
BOOST_THROW_EXCEPTION(std::bad_cast());
|
||||||
|
|
||||||
return object;
|
return tobject;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEmpty(void) const;
|
bool IsEmpty(void) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user