forked from organicmaps/organicmaps
[indexer] Fix variables initialization order: kSimilarToDeviceLanguages which depends from kLanguages(string_utf8_multilang.cpp) should not be global.
This commit is contained in:
parent
66f0e55c94
commit
74d3e7e798
1 changed files with 5 additions and 5 deletions
|
@ -31,11 +31,6 @@ int8_t GetIndex(string const & lang)
|
|||
return StrUtf8::GetLangIndex(lang);
|
||||
}
|
||||
|
||||
unordered_map<int8_t, vector<int8_t>> const kSimilarToDeviceLanguages =
|
||||
{
|
||||
{GetIndex("be"), {GetIndex("ru")}}
|
||||
};
|
||||
|
||||
void GetMwmLangName(feature::RegionData const & regionData, StringUtf8Multilang const & src, string & out)
|
||||
{
|
||||
vector<int8_t> mwmLangCodes;
|
||||
|
@ -101,6 +96,11 @@ bool GetBestName(StringUtf8Multilang const & src, vector<int8_t> const & priorit
|
|||
|
||||
vector<int8_t> GetSimilarToDeviceLanguages(int8_t deviceLang)
|
||||
{
|
||||
static unordered_map<int8_t, vector<int8_t>> const kSimilarToDeviceLanguages =
|
||||
{
|
||||
{GetIndex("be"), {GetIndex("ru")}}
|
||||
};
|
||||
|
||||
auto const it = kSimilarToDeviceLanguages.find(deviceLang);
|
||||
if (it != kSimilarToDeviceLanguages.cend())
|
||||
return it->second;
|
||||
|
|
Loading…
Add table
Reference in a new issue