From 17ff1aa84a25b9e6050e3eb9fac8dea5f23cd81c Mon Sep 17 00:00:00 2001 From: Yuri Gorshenin Date: Thu, 16 Feb 2017 13:43:15 +0300 Subject: [PATCH] Review fixes. --- search/geocoder.hpp | 2 +- search/intersection_result.hpp | 4 +--- search/pre_ranking_info.hpp | 3 ++- search/ranker.cpp | 2 +- search/search_integration_tests/ranker_test.cpp | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/search/geocoder.hpp b/search/geocoder.hpp index 9a89912919..0080b3db1b 100644 --- a/search/geocoder.hpp +++ b/search/geocoder.hpp @@ -197,7 +197,7 @@ private: // Forms result and feeds it to |m_preRanker|. void EmitResult(BaseContext const & ctx, MwmSet::MwmId const & mwmId, uint32_t ftId, SearchModel::SearchType type, TokenRange const & tokenRange, - IntersectionResult const * m_geoParts); + IntersectionResult const * geoParts); void EmitResult(BaseContext const & ctx, Region const & region, TokenRange const & tokenRange); void EmitResult(BaseContext const & ctx, City const & city, TokenRange const & tokenRange); diff --git a/search/intersection_result.hpp b/search/intersection_result.hpp index 3e493dff2d..b0fd8f10a6 100644 --- a/search/intersection_result.hpp +++ b/search/intersection_result.hpp @@ -12,9 +12,7 @@ namespace search // i.e. BUILDING and STREET for POI or STREET for BUILDING. struct IntersectionResult { - static uint32_t const kInvalidId = std::numeric_limits::max(); - - IntersectionResult() = default; + static uint32_t constexpr kInvalidId = std::numeric_limits::max(); void Set(SearchModel::SearchType type, uint32_t id); diff --git a/search/pre_ranking_info.hpp b/search/pre_ranking_info.hpp index a6657bd498..c9470f1ac3 100644 --- a/search/pre_ranking_info.hpp +++ b/search/pre_ranking_info.hpp @@ -40,7 +40,8 @@ struct PreRankingInfo // Tokens match to the feature name or house number. TokenRange m_tokenRange[SearchModel::SEARCH_TYPE_COUNT]; - // Different geo-parts participated in search. + // Different geo-parts extracted from query. Currently only poi, + // building and street ids are in |m_geoParts|. IntersectionResult m_geoParts; // Rank of the feature. diff --git a/search/ranker.cpp b/search/ranker.cpp index ca95c91b29..de51b56031 100644 --- a/search/ranker.cpp +++ b/search/ranker.cpp @@ -179,7 +179,7 @@ class PreResult2Maker return true; } - // For the best performance, incoming id's should be sorted by id.first (mwm file id). + // For the best performance, incoming ids should be sorted by id.first (mwm file id). bool LoadFeature(FeatureID const & id, FeatureType & ft, m2::PointD & center, string & name, string & country) { diff --git a/search/search_integration_tests/ranker_test.cpp b/search/search_integration_tests/ranker_test.cpp index 505e00ab3f..b554c815aa 100644 --- a/search/search_integration_tests/ranker_test.cpp +++ b/search/search_integration_tests/ranker_test.cpp @@ -5,7 +5,6 @@ #include "generator/generator_tests_support/test_feature.hpp" - using namespace generator::tests_support; using namespace search::tests_support; using namespace search;