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:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2017-03-28 19:27:59 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2017-03-30 14:54:36 +0300
commit965d71afc32981da4205b7b3189771acb0764e3a (patch)
treef9b8d103ecf405eae10b4d037c54ef7a31bee24c /indexer
parent8c3d4f78c7df9ae3fcb0fa912f9ea18803dd7e40 (diff)
Transliteration allowability parameter added.
Diffstat (limited to 'indexer')
-rw-r--r--indexer/drules_selector.cpp2
-rw-r--r--indexer/feature.cpp8
-rw-r--r--indexer/feature.hpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/indexer/drules_selector.cpp b/indexer/drules_selector.cpp
index 99c0e1f3c9..d515dc6c56 100644
--- a/indexer/drules_selector.cpp
+++ b/indexer/drules_selector.cpp
@@ -106,7 +106,7 @@ bool GetPopulation(FeatureType const & ft, uint64_t & population)
// Feature tag value evaluator for tag 'name'
bool GetName(FeatureType const & ft, string & name)
{
- ft.GetReadableName(name);
+ ft.GetReadableName(false /* allowTranslit */, name);
return true;
}
diff --git a/indexer/feature.cpp b/indexer/feature.cpp
index 0c1b23d506..fe5cb49aa1 100644
--- a/indexer/feature.cpp
+++ b/indexer/feature.cpp
@@ -491,7 +491,7 @@ FeatureType::geom_stat_t FeatureType::GetTrianglesSize(int scale) const
return geom_stat_t(sz, m_triangles.size());
}
-void FeatureType::GetPreferredNames(string & primary, string & secondary) const
+void FeatureType::GetPreferredNames(bool allowTranslit, string & primary, string & secondary) const
{
if (!HasName())
return;
@@ -503,11 +503,11 @@ void FeatureType::GetPreferredNames(string & primary, string & secondary) const
ParseCommon();
auto const deviceLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm());
- ::GetPreferredNames(mwmInfo->GetRegionData(), GetNames(), deviceLang, true /* allowTranslit */,
+ ::GetPreferredNames(mwmInfo->GetRegionData(), GetNames(), deviceLang, allowTranslit,
primary, secondary);
}
-void FeatureType::GetReadableName(string & name) const
+void FeatureType::GetReadableName(bool allowTranslit, string & name) const
{
if (!HasName())
return;
@@ -519,7 +519,7 @@ void FeatureType::GetReadableName(string & name) const
ParseCommon();
auto const deviceLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm());
- ::GetReadableName(mwmInfo->GetRegionData(), GetNames(), deviceLang, true /* allowTranslit */, name);
+ ::GetReadableName(mwmInfo->GetRegionData(), GetNames(), deviceLang, allowTranslit, name);
}
string FeatureType::GetHouseNumber() const
diff --git a/indexer/feature.hpp b/indexer/feature.hpp
index d580d5eedb..2716cd9827 100644
--- a/indexer/feature.hpp
+++ b/indexer/feature.hpp
@@ -285,9 +285,9 @@ public:
/// @param[out] intName optionally choosen from tags "name:<lang_code>" by the algorithm
//@{
/// Just get feature names.
- void GetPreferredNames(string & defaultName, string & intName) const;
+ void GetPreferredNames(bool allowTranslit, string & defaultName, string & intName) const;
/// Get one most suitable name for user.
- void GetReadableName(string & name) const;
+ void GetReadableName(bool allowTranslit, string & name) const;
static int8_t const DEFAULT_LANG = StringUtf8Multilang::kDefaultCode;
bool GetName(int8_t lang, string & name) const;