Make sure to use defined(__GNUC__) instead of bare __GNUC__ in flann2 header.
authorTheGoddessInari <thegoddessinari@gmail.com>
Sun, 28 Jul 2019 17:21:15 +0000 (10:21 -0700)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Mon, 5 Aug 2019 14:19:12 +0000 (17:19 +0300)
This fixes a compiler error on MSVC with Unreal Engine (at least).

backport of commit: 4e998c9adeb8ec874d29a0ed5d450da3a9bdd0e8

modules/flann/include/opencv2/flann/dist.h

index 0670122..4246a3d 100644 (file)
@@ -441,7 +441,7 @@ struct Hamming
             result = vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),0);
             result += vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),2);
         }
-#elif __GNUC__
+#elif defined(__GNUC__)
         {
             //for portability just use unsigned long -- and use the __builtin_popcountll (see docs for __builtin_popcountll)
             typedef unsigned long long pop_t;