From 12fd9dc7a1fd9d3fddf0cf88db0ffe0bf28e89d5 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Wed, 14 Oct 2015 10:37:33 +0300 Subject: [PATCH] Corrections after colleages comments. Second part. --- map/framework.hpp | 2 +- platform/get_text_by_id.cpp | 3 ++- platform/get_text_by_id.hpp | 4 ++-- routing/turns_tts_text.cpp | 4 ++-- routing/turns_tts_text.hpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/map/framework.hpp b/map/framework.hpp index fa96242462..ecfd2ee871 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -605,7 +605,7 @@ public: inline bool AreTurnNotificationsEnabled() const { return m_routingSession.AreTurnNotificationsEnabled(); } /// \brief Sets a locale for TTS. /// \param locale is a string with locale code. For example "en", "ru", "zh-Hant" and so on. - /// \note ee sound/tts/languages.txt for the full list of available locales. + /// \note See sound/tts/languages.txt for the full list of available locales. inline void SetTurnNotificationsLocale(string const & locale) { m_routingSession.SetTurnNotificationsLocale(locale); } /// @return current TTS locale. For example "en", "ru", "zh-Hant" and so on. /// In case of error returns an empty string. diff --git a/platform/get_text_by_id.cpp b/platform/get_text_by_id.cpp index 8683710e80..4a2ebafb95 100644 --- a/platform/get_text_by_id.cpp +++ b/platform/get_text_by_id.cpp @@ -29,6 +29,7 @@ string GetTextSourceString(platform::TextSource textSource) } #endif ASSERT(false, ()); + return string(); } bool GetJsonBuffer(platform::TextSource textSource, string const & localeName, string & jsonBuffer) @@ -58,7 +59,7 @@ TGetTextByIdPtr MakeGetTextById(string const & jsonBuffer, string const & locale TGetTextByIdPtr result(new GetTextById(jsonBuffer, localeName)); if (!result->IsValid()) { - ASSERT(false, ()); + ASSERT(false, ("Can't create a GetTextById instance from a json file. localeName=", localeName)); return nullptr; } return result; diff --git a/platform/get_text_by_id.hpp b/platform/get_text_by_id.hpp index d002149d1a..9a6fd38467 100644 --- a/platform/get_text_by_id.hpp +++ b/platform/get_text_by_id.hpp @@ -15,7 +15,7 @@ enum class TextSource }; class GetTextById; -typedef unique_ptr TGetTextByIdPtr; +using TGetTextByIdPtr = unique_ptr; /// GetTextById represents text messages which are saved in textsDir /// in a specified locale. @@ -45,7 +45,7 @@ private: /// Factories to create GetTextById instances. /// If TGetTextByIdPtr is created by GetTextByIdFactory or ForTestingGetTextByIdFactory -/// threre are only two possibities: +/// there are only two possibities: /// * a factory returns a valid instance /// * a factory returns nullptr TGetTextByIdPtr GetTextByIdFactory(TextSource textSource, string const & localeName); diff --git a/routing/turns_tts_text.cpp b/routing/turns_tts_text.cpp index 6932c710d0..2cd97f735f 100644 --- a/routing/turns_tts_text.cpp +++ b/routing/turns_tts_text.cpp @@ -61,7 +61,7 @@ string GetTtsText::operator()(Notification const & notification) const string GetTtsText::GetLocale() const { - if (m_getCurLang) + if (m_getCurLang == nullptr) { ASSERT(false, ()); return string(); @@ -73,7 +73,7 @@ string GetTtsText::GetTextById(string const & textId) const { ASSERT(!textId.empty(), ()); - if (!m_getCurLang) + if (m_getCurLang == nullptr) { ASSERT(false, ()); return ""; diff --git a/routing/turns_tts_text.hpp b/routing/turns_tts_text.hpp index 89154d0335..0229c35645 100644 --- a/routing/turns_tts_text.hpp +++ b/routing/turns_tts_text.hpp @@ -24,7 +24,7 @@ public: string operator()(Notification const & notification) const; /// \brief Sets a locale. /// @param locale is a string representation of locale. For example "en", "ru", "zh-Hant" and so on. - /// \note ee sound/tts/languages.txt for the full list of available locales. + /// \note See sound/tts/languages.txt for the full list of available locales. void SetLocale(string const & locale); /// @return current TTS locale. For example "en", "ru", "zh-Hant" and so on. /// \note The method returns correct locale after SetLocale has been called.