Revert "Fixed a bug in FLANN resulting in uninitialized accesses."
This reverts commit a9975b144a22e76228125eb0a25f78ec13db6815, to prepare for cherry-picking upstream's solution.
This commit is contained in:
parent
60bcc52c4f
commit
78c4ffec99
@ -257,7 +257,8 @@ public:
|
||||
const T& cast() const
|
||||
{
|
||||
if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
|
||||
T* r = reinterpret_cast<T*>(policy->get_value(const_cast<void **>(&object)));
|
||||
void* obj = const_cast<void*>(object);
|
||||
T* r = reinterpret_cast<T*>(policy->get_value(&obj));
|
||||
return *r;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user