Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/search
diff options
context:
space:
mode:
Diffstat (limited to 'search')
-rw-r--r--search/intermediate_result.hpp5
-rw-r--r--search/pre_ranker.cpp16
-rw-r--r--search/query_saver.hpp2
-rw-r--r--search/v2/pre_ranking_info.cpp2
-rw-r--r--search/v2/ranking_info.cpp1
-rw-r--r--search/v2/ranking_info.hpp3
-rw-r--r--search/v2/ranking_utils.hpp1
7 files changed, 13 insertions, 17 deletions
diff --git a/search/intermediate_result.hpp b/search/intermediate_result.hpp
index 07172b6366..840b4db8ac 100644
--- a/search/intermediate_result.hpp
+++ b/search/intermediate_result.hpp
@@ -19,6 +19,7 @@ struct CountryInfo;
namespace search
{
class ReverseGeocoder;
+
namespace impl
{
/// First pass results class. Objects are creating during search in trie.
@@ -152,9 +153,7 @@ inline string DebugPrint(PreResult2 const & t)
{
return t.DebugPrint();
}
-
-} // namespace search::impl
+} // namespace impl
void ProcessMetadata(FeatureType const & ft, Result::Metadata & meta);
-
} // namespace search
diff --git a/search/pre_ranker.cpp b/search/pre_ranker.cpp
index 8b70e37d96..2d99624053 100644
--- a/search/pre_ranker.cpp
+++ b/search/pre_ranker.cpp
@@ -2,6 +2,8 @@
#include "search/v2/pre_ranking_info.hpp"
+#include "base/stl_helpers.hpp"
+
#include "std/iterator.hpp"
#include "std/random.hpp"
#include "std/set.hpp"
@@ -20,16 +22,6 @@ struct LessFeatureID
}
};
-struct EqualFeatureID
-{
- using TValue = impl::PreResult1;
-
- inline bool operator()(TValue const & lhs, TValue const & rhs) const
- {
- return lhs.GetId() == rhs.GetId();
- }
-};
-
// Orders PreResult1 by following criterion:
// 1. Feature Id (increasing), if same...
// 2. Number of matched tokens from the query (decreasing), if same...
@@ -60,7 +52,9 @@ void PreRanker::Filter(bool viewportSearch)
TSet theSet;
sort(m_results.begin(), m_results.end(), ComparePreResult1());
- m_results.erase(unique(m_results.begin(), m_results.end(), EqualFeatureID()), m_results.end());
+ m_results.erase(
+ unique(m_results.begin(), m_results.end(), my::EqualsBy(&impl::PreResult1::GetId)),
+ m_results.end());
sort(m_results.begin(), m_results.end(), &impl::PreResult1::LessDistance);
diff --git a/search/query_saver.hpp b/search/query_saver.hpp
index 1d677309c5..5c93f1b1c3 100644
--- a/search/query_saver.hpp
+++ b/search/query_saver.hpp
@@ -1,3 +1,5 @@
+#pragma once
+
#include "std/list.hpp"
#include "std/string.hpp"
#include "std/vector.hpp"
diff --git a/search/v2/pre_ranking_info.cpp b/search/v2/pre_ranking_info.cpp
index d8b84d9fac..b45f92dc08 100644
--- a/search/v2/pre_ranking_info.cpp
+++ b/search/v2/pre_ranking_info.cpp
@@ -1,4 +1,4 @@
-#include "search/v2/ranking_info.hpp"
+#include "search/v2/pre_ranking_info.hpp"
#include "std/sstream.hpp"
diff --git a/search/v2/ranking_info.cpp b/search/v2/ranking_info.cpp
index 82d4c4f70f..0de02d483e 100644
--- a/search/v2/ranking_info.cpp
+++ b/search/v2/ranking_info.cpp
@@ -1,6 +1,7 @@
#include "search/v2/ranking_info.hpp"
#include "std/cmath.hpp"
+#include "std/iomanip.hpp"
#include "std/limits.hpp"
#include "std/sstream.hpp"
diff --git a/search/v2/ranking_info.hpp b/search/v2/ranking_info.hpp
index e86811a3ee..8a1cf70896 100644
--- a/search/v2/ranking_info.hpp
+++ b/search/v2/ranking_info.hpp
@@ -1,10 +1,11 @@
#pragma once
-#include "search/v2/geocoder.hpp"
#include "search/v2/pre_ranking_info.hpp"
#include "search/v2/ranking_utils.hpp"
#include "search/v2/search_model.hpp"
+#include "std/iostream.hpp"
+
class FeatureType;
namespace search
diff --git a/search/v2/ranking_utils.hpp b/search/v2/ranking_utils.hpp
index 54adeb7561..1d0d1d2c65 100644
--- a/search/v2/ranking_utils.hpp
+++ b/search/v2/ranking_utils.hpp
@@ -1,7 +1,6 @@
#pragma once
#include "search/query_params.hpp"
-#include "search/v2/geocoder.hpp"
#include "search/v2/search_model.hpp"
#include "indexer/search_delimiters.hpp"