diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-05-10 14:22:32 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-05-10 14:22:32 +0300 |
commit | 8de7e06e4c153d16ba4a31c1ddbd323cd5b57a51 (patch) | |
tree | 97bd0616d486995d354727b64401865ebe024fac /indexer | |
parent | 929af9660c98fe5bb29d08099744cb8cfcb01e09 (diff) |
warning fixes
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/feature_utils.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indexer/feature_utils.cpp b/indexer/feature_utils.cpp index 64b7d8779c..1762186a56 100644 --- a/indexer/feature_utils.cpp +++ b/indexer/feature_utils.cpp @@ -49,10 +49,11 @@ bool GetTransliteratedName(feature::RegionData const & regionData, StringUtf8Mul bool GetBestName(StringUtf8Multilang const & src, vector<int8_t> const & priorityList, string & out) { - auto bestIndex = priorityList.size(); + long const priorityListSize = static_cast<long>(priorityList.size()); + auto bestIndex = priorityListSize; auto const findAndSet = [](vector<int8_t> const & langs, int8_t const code, string const & name, - size_t & bestIndex, string & outName) + long & bestIndex, string & outName) { auto const it = find(langs.begin(), langs.end(), code); if (it != langs.end() && bestIndex > distance(langs.begin(), it)) @@ -72,13 +73,13 @@ bool GetBestName(StringUtf8Multilang const & src, vector<int8_t> const & priorit }); // There are many "junk" names in Arabian island. - if (bestIndex < priorityList.size() && + if (bestIndex < priorityListSize && priorityList[bestIndex] == StrUtf8::kInternationalCode) { out = out.substr(0, out.find_first_of(',')); } - return bestIndex < priorityList.size(); + return bestIndex < priorityListSize; } } // namespace |