From 8d085a0b88dc0141492a1562f70fddaf812e537f Mon Sep 17 00:00:00 2001 From: vng Date: Thu, 10 Mar 2016 17:38:16 +0300 Subject: [PATCH] Correct using of CheckUniqueIndexes. --- search/v2/mwm_context.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/search/v2/mwm_context.hpp b/search/v2/mwm_context.hpp index b1f4463b9f..58ff43cd0c 100644 --- a/search/v2/mwm_context.hpp +++ b/search/v2/mwm_context.hpp @@ -75,7 +75,12 @@ private: { CheckUniqueIndexes checkUnique(m_value.GetHeader().GetFormat() >= version::Format::v5); for (auto const & i : intervals) - m_index.ForEachInIntervalAndScale([&] (uint32_t index) { fn(index); }, i.first, i.second, scale); + m_index.ForEachInIntervalAndScale( + [&] (uint32_t index) + { + if (checkUnique(index)) + fn(index); + }, i.first, i.second, scale); } DISALLOW_COPY_AND_MOVE(MwmContext);