From 9361b68c52118402110503dd2b0ca8cabdd02606 Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 27 Feb 2018 11:14:03 +0100 Subject: [PATCH 1/2] [matching] fix comparing int* to int (clang4 crash) also the if was useless --- src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp b/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp index ebeeedf670..9793e4a45e 100644 --- a/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp +++ b/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp @@ -137,11 +137,8 @@ class ArrayMatcher_kdtreeFlann : public ArrayMatcher { for (size_t j = 0; j < NN; ++j) { - if (indices[i] > 0) - { pvec_indices->emplace_back(IndMatch(i, vec_indices[i*NN+j])); pvec_distances->emplace_back(vec_distances[i*NN+j]); - } } } return true; From 460bded3dcd0461a5ab9591abcf1d1c7e754e36d Mon Sep 17 00:00:00 2001 From: Simone Gasparini Date: Tue, 27 Feb 2018 11:16:15 +0100 Subject: [PATCH 2/2] [matching] correct emplace_back --- src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp b/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp index 9793e4a45e..4e2b698b35 100644 --- a/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp +++ b/src/aliceVision/matching/ArrayMatcher_kdtreeFlann.hpp @@ -137,7 +137,7 @@ class ArrayMatcher_kdtreeFlann : public ArrayMatcher { for (size_t j = 0; j < NN; ++j) { - pvec_indices->emplace_back(IndMatch(i, vec_indices[i*NN+j])); + pvec_indices->emplace_back(i, vec_indices[i*NN+j]); pvec_distances->emplace_back(vec_distances[i*NN+j]); } }