diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2018-07-30 16:36:52 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2018-07-30 19:26:47 +0300 |
commit | 0e889ff8aac083077dedd525d60dfef182e53f0f (patch) | |
tree | 14e8d675728e5b8c56912ae644e834a07cfd0a26 /search | |
parent | 9f3df8b8658964ca24ff39e093d2e88419b9599d (diff) |
[indexer] Style & includes
Diffstat (limited to 'search')
-rw-r--r-- | search/keyword_lang_matcher.hpp | 5 | ||||
-rw-r--r-- | search/model.cpp | 17 | ||||
-rw-r--r-- | search/search_integration_tests/generate_tests.cpp | 4 | ||||
-rw-r--r-- | search/token_slice.hpp | 2 |
4 files changed, 16 insertions, 12 deletions
diff --git a/search/keyword_lang_matcher.hpp b/search/keyword_lang_matcher.hpp index 0a46036a2b..16acde9022 100644 --- a/search/keyword_lang_matcher.hpp +++ b/search/keyword_lang_matcher.hpp @@ -5,6 +5,7 @@ #include "base/string_utils.hpp" #include <array> +#include <string> #include <utility> #include <vector> @@ -22,7 +23,7 @@ public: private: friend class KeywordLangMatcher; - friend string DebugPrint(Score const & score); + friend std::string DebugPrint(Score const & score); Score(KeywordMatcher::Score const & score, int langScore); @@ -58,7 +59,7 @@ public: } // Returns the Score of the name (greater is better). - Score CalcScore(int8_t lang, string const & name) const; + Score CalcScore(int8_t lang, std::string const & name) const; Score CalcScore(int8_t lang, strings::UniString const & name) const; Score CalcScore(int8_t lang, strings::UniString const * tokens, size_t count) const; diff --git a/search/model.cpp b/search/model.cpp index 42d9651421..c532549af5 100644 --- a/search/model.cpp +++ b/search/model.cpp @@ -4,6 +4,7 @@ #include "indexer/feature.hpp" #include "base/macros.hpp" +#include "base/stl_add.hpp" using namespace ftypes; @@ -12,14 +13,14 @@ namespace search TwoLevelPOIChecker::TwoLevelPOIChecker() : ftypes::BaseChecker(2 /* level */) { Classificator const & c = classif(); - StringIL arr[] = {{"highway", "bus_stop"}, - {"highway", "speed_camera"}, - {"waterway", "waterfall"}, - {"natural", "volcano"}, - {"natural", "cave_entrance"}, - {"natural", "beach"}, - {"emergency", "defibrillator"}, - {"emergency", "fire_hydrant"}}; + my::StringIL arr[] = {{"highway", "bus_stop"}, + {"highway", "speed_camera"}, + {"waterway", "waterfall"}, + {"natural", "volcano"}, + {"natural", "cave_entrance"}, + {"natural", "beach"}, + {"emergency", "defibrillator"}, + {"emergency", "fire_hydrant"}}; for (size_t i = 0; i < ARRAY_SIZE(arr); ++i) m_types.push_back(c.GetTypeByPath(arr[i])); diff --git a/search/search_integration_tests/generate_tests.cpp b/search/search_integration_tests/generate_tests.cpp index bc2506ae09..c90aa143e3 100644 --- a/search/search_integration_tests/generate_tests.cpp +++ b/search/search_integration_tests/generate_tests.cpp @@ -14,6 +14,8 @@ #include "platform/local_country_file.hpp" +#include "base/stl_add.hpp" + #include <cstdint> #include <set> #include <string> @@ -67,7 +69,7 @@ UNIT_CLASS_TEST(GenerateTest, GenerateDeprecatedTypes) TEST_EQUAL(dataSource.Register(file).second, MwmSet::RegResult::Success, ()); // New types. - StringIL arr[] = {{"shop"}, {"office"}}; + my::StringIL arr[] = {{"shop"}, {"office"}}; Classificator const & cl = classif(); set<uint32_t> types; diff --git a/search/token_slice.hpp b/search/token_slice.hpp index e9f5d2b323..37a412ed15 100644 --- a/search/token_slice.hpp +++ b/search/token_slice.hpp @@ -76,7 +76,7 @@ template <typename Cont> class QuerySliceOnRawStrings : public StringSliceBase { public: - QuerySliceOnRawStrings(Cont const & tokens, TString const & prefix) + QuerySliceOnRawStrings(Cont const & tokens, String const & prefix) : m_tokens(tokens), m_prefix(prefix) { } |