mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-03 15:58:23 +02:00
DynamicAny::extract performance optimization
This commit is contained in:
parent
45d601089b
commit
e933e93b50
@ -168,9 +168,11 @@ public:
|
|||||||
/// the stored value, otherwise a BadCastException
|
/// the stored value, otherwise a BadCastException
|
||||||
/// is thrown.
|
/// is thrown.
|
||||||
{
|
{
|
||||||
DynamicAnyHolderImpl<T>* pHolder = dynamic_cast<DynamicAnyHolderImpl<T>*>(_pHolder);
|
if (_pHolder && _pHolder->type() == typeid(T))
|
||||||
if (pHolder)
|
{
|
||||||
|
DynamicAnyHolderImpl<T>* pHolder = static_cast<DynamicAnyHolderImpl<T>*>(_pHolder);
|
||||||
return pHolder->value();
|
return pHolder->value();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
throw BadCastException();
|
throw BadCastException();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user