Commit 78c4ffec authored by Roman Donchenko's avatar Roman Donchenko

Revert "Fixed a bug in FLANN resulting in uninitialized accesses."

This reverts commit a9975b14, to prepare
for cherry-picking upstream's solution.
parent 60bcc52c
...@@ -257,7 +257,8 @@ public: ...@@ -257,7 +257,8 @@ 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();
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; return *r;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment