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
diff options
context:
space:
mode:
-rw-r--r--map/search_api.cpp2
-rw-r--r--search/ranker.cpp4
-rw-r--r--search/region_info_getter.cpp6
-rw-r--r--search/search_tests/region_info_getter_tests.cpp2
4 files changed, 10 insertions, 4 deletions
diff --git a/map/search_api.cpp b/map/search_api.cpp
index a3f5f8a47f..f6e4e20b4e 100644
--- a/map/search_api.cpp
+++ b/map/search_api.cpp
@@ -85,7 +85,7 @@ SearchAPI::SearchAPI(Index & index, storage::Storage const & storage,
, m_infoGetter(infoGetter)
, m_delegate(delegate)
, m_engine(m_index, GetDefaultCategories(), m_infoGetter,
- Engine::Params(languages::GetCurrentOrig() /* locale */, 1 /* params.m_numThreads */))
+ Engine::Params(languages::GetCurrentTwine() /* locale */, 1 /* params.m_numThreads */))
{
}
diff --git a/search/ranker.cpp b/search/ranker.cpp
index 3fba665e21..18a4c2d7d4 100644
--- a/search/ranker.cpp
+++ b/search/ranker.cpp
@@ -578,8 +578,8 @@ void Ranker::MatchForSuggestions(strings::UniString const & token, int8_t locale
for (auto const & suggest : m_suggests)
{
strings::UniString const & s = suggest.m_name;
- if (suggest.m_prefixLength <= token.size() &&
- token != s // do not push suggestion if it already equals to token
+ if (suggest.m_prefixLength <= token.size()
+ && token != s // do not push suggestion if it already equals to token
&& suggest.m_locale == locale // push suggestions only for needed language
&& strings::StartsWith(s, token))
{
diff --git a/search/region_info_getter.cpp b/search/region_info_getter.cpp
index f0c758532d..13df010473 100644
--- a/search/region_info_getter.cpp
+++ b/search/region_info_getter.cpp
@@ -2,6 +2,7 @@
#include "storage/country_decl.hpp"
+#include "base/logging.hpp"
#include "base/stl_helpers.hpp"
#include "base/string_utils.hpp"
@@ -25,6 +26,9 @@ void GetPathToRoot(storage::TCountryId const & id, storage::TCountryTree const &
vector<storage::TCountryTree::Node const *> nodes;
countries.Find(id, nodes);
+ if (nodes.empty())
+ LOG(LERROR, ("Can't find node in the countries tree for:", id));
+
if (nodes.size() != 1 || nodes[0]->IsRoot())
return;
@@ -66,7 +70,7 @@ string RegionInfoGetter::GetLocalizedFullName(storage::TCountryId const & id) co
return strings::JoinStrings(parts, ", ");
// Tries to get at least localized name for |id|, if |id| is a
- // discussed territory.
+ // disputed territory.
auto name = GetLocalizedCountryName(id);
if (!name.empty())
return name;
diff --git a/search/search_tests/region_info_getter_tests.cpp b/search/search_tests/region_info_getter_tests.cpp
index 35c9266c08..98aefa4bdf 100644
--- a/search/search_tests/region_info_getter_tests.cpp
+++ b/search/search_tests/region_info_getter_tests.cpp
@@ -2,6 +2,8 @@
#include "search/region_info_getter.hpp"
+#include <string>
+
using namespace search;
namespace