diff --git a/android/jni/com/mapswithme/maps/SearchEngine.cpp b/android/jni/com/mapswithme/maps/SearchEngine.cpp index 7ecd6f3912..3be664c597 100644 --- a/android/jni/com/mapswithme/maps/SearchEngine.cpp +++ b/android/jni/com/mapswithme/maps/SearchEngine.cpp @@ -187,7 +187,7 @@ extern "C" params.SetInputLocale(ReplaceDeprecatedLanguageCode(jni::ToNativeString(env, lang))); params.SetForceSearch(true); params.SetMode(search::Mode::World); - params.DisableSuggests(); + params.SetSuggestsEnabled(false); params.m_onResults = bind(&OnResults, _1, timestamp, false /* isMapAndTable */, false /* hasPosition */, 0.0, 0.0); g_framework->NativeFramework()->Search(params); diff --git a/iphone/Maps/Classes/MapDownloader/MWMMapDownloaderViewController.mm b/iphone/Maps/Classes/MapDownloader/MWMMapDownloaderViewController.mm index e7b62706d6..a4faa74cbe 100644 --- a/iphone/Maps/Classes/MapDownloader/MWMMapDownloaderViewController.mm +++ b/iphone/Maps/Classes/MapDownloader/MWMMapDownloaderViewController.mm @@ -134,7 +134,7 @@ using namespace storage; { __weak auto weakSelf = self; m_searchParams.SetMode(search::Mode::World); - m_searchParams.DisableSuggests(); + m_searchParams.SetSuggestsEnabled(false); m_searchParams.m_onResults = ^(search::Results const & results) { __strong auto self = weakSelf; diff --git a/search/params.hpp b/search/params.hpp index 4156a05979..211ffb6c17 100644 --- a/search/params.hpp +++ b/search/params.hpp @@ -43,9 +43,8 @@ namespace search /// @param[in] locale can be "fr", "en-US", "ru_RU" etc. inline void SetInputLocale(string const & locale) { m_inputLocale = locale; } - inline void DisableSuggests() { m_suggestsEnabled = false; } - inline void EnableSuggests() { m_suggestsEnabled = true; } - inline bool SuggestsEnabled() const { return m_suggestsEnabled; } + inline void SetSuggestsEnabled(bool enabled) { m_suggestsEnabled = enabled; } + inline bool GetSuggestsEnabled() const { return m_suggestsEnabled; } bool IsEqualCommon(SearchParams const & rhs) const; diff --git a/search/search_engine.cpp b/search/search_engine.cpp index d5faada793..20d01fef3b 100644 --- a/search/search_engine.cpp +++ b/search/search_engine.cpp @@ -294,7 +294,7 @@ void Engine::DoSearch(SearchParams const & params, m2::RectD const & viewport, processor.SetPosition(viewport.Center()); processor.SetMode(params.GetMode()); - processor.EnableSuggests(params.SuggestsEnabled()); + processor.SetSuggestsEnabled(params.GetSuggestsEnabled()); // This flag is needed for consistency with old search algorithm // only. It will be gone when we remove old search code. diff --git a/search/search_integration_tests/search_query_v2_test.cpp b/search/search_integration_tests/search_query_v2_test.cpp index 01da88ec54..f40f12a750 100644 --- a/search/search_integration_tests/search_query_v2_test.cpp +++ b/search/search_integration_tests/search_query_v2_test.cpp @@ -353,7 +353,7 @@ UNIT_CLASS_TEST(SearchQueryV2Test, DisableSuggests) params.m_query = "londo"; params.m_inputLocale = "en"; params.SetMode(search::Mode::World); - params.DisableSuggests(); + params.SetSuggestsEnabled(false); TestSearchRequest request(m_engine, params, m_viewport); request.Wait(); diff --git a/search/search_query.hpp b/search/search_query.hpp index ea791422c4..c9ab994940 100644 --- a/search/search_query.hpp +++ b/search/search_query.hpp @@ -91,7 +91,7 @@ public: inline void SetMode(Mode mode) { m_mode = mode; } inline void SetSearchInWorld(bool b) { m_worldSearch = b; } - inline void EnableSuggests(bool enabled) { m_suggestsEnabled = enabled; } + inline void SetSuggestsEnabled(bool enabled) { m_suggestsEnabled = enabled; } /// Suggestions language code, not the same as we use in mwm data int8_t m_inputLocaleCode, m_currentLocaleCode;