Merge pull request #1392 from SpecLad:flann-uninit
This commit is contained in:
commit
33d8d8ffd1
@ -255,8 +255,7 @@ public:
|
|||||||
const T& cast() const
|
const T& cast() const
|
||||||
{
|
{
|
||||||
if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
|
if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
|
||||||
void* obj = const_cast<void*>(object);
|
T* r = reinterpret_cast<T*>(policy->get_value(const_cast<void **>(&object)));
|
||||||
T* r = reinterpret_cast<T*>(policy->get_value(&obj));
|
|
||||||
return *r;
|
return *r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user