diff --git a/search/retrieval.cpp b/search/retrieval.cpp index 5186d409ef..aa7ab9a0ad 100644 --- a/search/retrieval.cpp +++ b/search/retrieval.cpp @@ -27,6 +27,7 @@ #include "base/checked_cast.hpp" #include "std/algorithm.hpp" +#include "std/utility.hpp" using namespace strings; using osm::Editor; @@ -195,8 +196,6 @@ bool MatchFeatureByPostcode(FeatureType const & ft, TokenSlice const & slice) return true; } -// Retrieves from the search index corresponding to |value| all -// features matching to |params|. template unique_ptr RetrieveAddressFeaturesImpl( Retrieval::TrieRoot const & root, MwmContext const & context, @@ -245,8 +244,6 @@ unique_ptr RetrievePostcodeFeaturesImpl( return SortFeaturesAndBuildCBV(move(features)); } -// Retrieves from the geometry index corresponding to handle all -// features from |coverage|. unique_ptr RetrieveGeometryFeaturesImpl( MwmContext const & context, my::Cancellable const & cancellable, m2::RectD const & rect, int scale) @@ -313,7 +310,7 @@ Retrieval::Retrieval(MwmContext const & context, my::Cancellable const & cancell { case version::MwmTraits::SearchIndexFormat::FeaturesWithRankAndCenter: m_root0 = ReadTrie(value, m_reader); - break; + break; case version::MwmTraits::SearchIndexFormat::CompressedBitVector: m_root1 = ReadTrie(value, m_reader); break; @@ -352,12 +349,14 @@ unique_ptr Retrieval::Retrieve(Args &&... args) case version::MwmTraits::SearchIndexFormat::FeaturesWithRankAndCenter: { R r; + ASSERT(m_root0, ()); return r(*m_root0, m_context, m_cancellable, forward(args)...); } break; case version::MwmTraits::SearchIndexFormat::CompressedBitVector: { R r; + ASSERT(m_root1, ()); return r(*m_root1, m_context, m_cancellable, forward(args)...); } break;