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:
authorMaxim Pimenov <m@maps.me>2018-07-02 13:42:55 +0300
committerTatiana Yan <tatiana.kondakova@gmail.com>2018-07-02 15:45:54 +0300
commit2d1d5be066aad908b7686b8a92101a008d8e30a5 (patch)
treecc01db6f2e7035717a6961e61fcd5de448c14339 /search
parent9f8508bb7bffc7ef2b7aba18fd46e26ff6fa0a79 (diff)
Review fixes.
Diffstat (limited to 'search')
-rw-r--r--search/base/text_index/dictionary.hpp1
-rw-r--r--search/base/text_index/mem.hpp13
-rw-r--r--search/base/text_index/reader.hpp1
3 files changed, 9 insertions, 6 deletions
diff --git a/search/base/text_index/dictionary.hpp b/search/base/text_index/dictionary.hpp
index 01670d2f9a..312380bb60 100644
--- a/search/base/text_index/dictionary.hpp
+++ b/search/base/text_index/dictionary.hpp
@@ -10,6 +10,7 @@
#include <algorithm>
#include <cstdint>
+#include <utility>
#include <vector>
namespace search
diff --git a/search/base/text_index/mem.hpp b/search/base/text_index/mem.hpp
index a0611c318a..26059e3f1f 100644
--- a/search/base/text_index/mem.hpp
+++ b/search/base/text_index/mem.hpp
@@ -17,6 +17,7 @@
#include <map>
#include <memory>
#include <string>
+#include <utility>
#include <vector>
namespace search
@@ -83,6 +84,12 @@ public:
}
private:
+ template <typename Sink>
+ static uint32_t RelativePos(Sink & sink, uint64_t startPos)
+ {
+ return ::base::checked_cast<uint32_t>(sink.Pos() - startPos);
+ }
+
void SortPostings();
void BuildDictionary();
@@ -166,12 +173,6 @@ private:
}
}
- template <typename Sink>
- static uint32_t RelativePos(Sink & sink, uint64_t startPos)
- {
- return ::base::checked_cast<uint32_t>(sink.Pos() - startPos);
- }
-
std::map<Token, std::vector<Posting>> m_postingsByToken;
TextIndexDictionary m_dictionary;
};
diff --git a/search/base/text_index/reader.hpp b/search/base/text_index/reader.hpp
index 47609982f6..5ad39034d3 100644
--- a/search/base/text_index/reader.hpp
+++ b/search/base/text_index/reader.hpp
@@ -11,6 +11,7 @@
#include <cstdint>
#include <string>
+#include <utility>
#include <vector>
namespace search