From 78c4ffec9958ca88242de69647e61f2a5d3702bb Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Wed, 2 Oct 2013 16:02:11 +0400 Subject: [PATCH] Revert "Fixed a bug in FLANN resulting in uninitialized accesses." This reverts commit a9975b144a22e76228125eb0a25f78ec13db6815, to prepare for cherry-picking upstream's solution. --- modules/flann/include/opencv2/flann/any.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/flann/include/opencv2/flann/any.h b/modules/flann/include/opencv2/flann/any.h index 070d5a421f..4042db67c7 100644 --- a/modules/flann/include/opencv2/flann/any.h +++ b/modules/flann/include/opencv2/flann/any.h @@ -257,7 +257,8 @@ public: const T& cast() const { if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast(); - T* r = reinterpret_cast(policy->get_value(const_cast(&object))); + void* obj = const_cast(object); + T* r = reinterpret_cast(policy->get_value(&obj)); return *r; }