Merge pull request #1392 from SpecLad:flann-uninit

This commit is contained in:
Roman Donchenko 2013-09-04 15:49:14 +04:00 committed by OpenCV Buildbot
commit 33d8d8ffd1

View File

@ -255,8 +255,7 @@ public:
const T& cast() const
{
if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
void* obj = const_cast<void*>(object);
T* r = reinterpret_cast<T*>(policy->get_value(&obj));
T* r = reinterpret_cast<T*>(policy->get_value(const_cast<void **>(&object)));
return *r;
}