forked from organicmaps/organicmaps
Minor code prettify.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
parent
bdab3c9ad6
commit
cfceb4c14b
5 changed files with 10 additions and 15 deletions
|
@ -118,10 +118,7 @@ bool Transliteration::Transliterate(std::string const & transID, icu::UnicodeStr
|
|||
|
||||
it->second->m_transliterator->transliterate(ustr);
|
||||
|
||||
if (ustr.isEmpty())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return !ustr.isEmpty();
|
||||
}
|
||||
|
||||
bool Transliteration::TransliterateForce(std::string const & str, std::string const & transliteratorId,
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "platform/platform.hpp"
|
||||
|
||||
#include "coding/endianness.hpp"
|
||||
#include "coding/transliteration.hpp"
|
||||
|
||||
#include "base/file_name_utils.hpp"
|
||||
#include "base/timer.hpp"
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
#include "coding/transliteration.hpp"
|
||||
|
||||
#include "coding/transliteration.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
#include "base/dfa_helpers.hpp"
|
||||
#include "base/macros.hpp"
|
||||
|
|
|
@ -12,23 +12,24 @@
|
|||
|
||||
void InitTransliterationInstanceWithDefaultDirs()
|
||||
{
|
||||
Platform const & pl = GetPlatform();
|
||||
|
||||
#if defined(OMIM_OS_ANDROID)
|
||||
char const kICUDataFile[] = "icudt70l.dat";
|
||||
if (!GetPlatform().IsFileExistsByFullPath(GetPlatform().WritableDir() + kICUDataFile))
|
||||
if (!pl.IsFileExistsByFullPath(pl.WritableDir() + kICUDataFile))
|
||||
{
|
||||
try
|
||||
{
|
||||
ZipFileReader::UnzipFile(GetPlatform().ResourcesDir(), std::string("assets/") + kICUDataFile,
|
||||
GetPlatform().WritableDir() + kICUDataFile);
|
||||
ZipFileReader::UnzipFile(pl.ResourcesDir(), std::string("assets/") + kICUDataFile,
|
||||
pl.WritableDir() + kICUDataFile);
|
||||
}
|
||||
catch (RootException const & e)
|
||||
{
|
||||
LOG(LWARNING,
|
||||
("Can't get transliteration data file \"", kICUDataFile, "\", reason:", e.Msg()));
|
||||
LOG(LWARNING, ("Can't get transliteration data file \"", kICUDataFile, "\", reason:", e.Msg()));
|
||||
}
|
||||
}
|
||||
Transliteration::Instance().Init(GetPlatform().WritableDir());
|
||||
Transliteration::Instance().Init(pl.WritableDir());
|
||||
#else
|
||||
Transliteration::Instance().Init(GetPlatform().ResourcesDir());
|
||||
Transliteration::Instance().Init(pl.ResourcesDir());
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ Framework::Framework(FrameworkParams const & params)
|
|||
|
||||
m_featuresFetcher.GetDataSource().AddObserver(editor);
|
||||
|
||||
LOG(LINFO, ("Editor initialized"));
|
||||
LOG(LDEBUG, ("Editor initialized"));
|
||||
|
||||
m_trafficManager.SetCurrentDataVersion(m_storage.GetCurrentDataVersion());
|
||||
m_trafficManager.SetSimplifiedColorScheme(LoadTrafficSimplifiedColors());
|
||||
|
|
Loading…
Add table
Reference in a new issue