review fixes

This commit is contained in:
Arsentiy Milchakov 2016-08-22 11:45:37 +03:00
parent 003fa128b5
commit 3ba6b9bde0
2 changed files with 7 additions and 7 deletions

View file

@ -30,7 +30,7 @@ bool ExtractName(StringUtf8Multilang const & names, int8_t const langCode,
if (result.end() != it)
return false;
string name;
names.GetString(langCode, name);
result.emplace_back(langCode, name);
@ -49,7 +49,7 @@ size_t PushMwmLanguages(StringUtf8Multilang const & names, vector<int8_t> const
if (ExtractName(names, mwmLanguages[i], result))
++count;
}
return count;
}
} // namespace
@ -123,7 +123,7 @@ NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const
// Push english name.
if (ExtractName(source, StringUtf8Multilang::kEnglishCode, names))
++mandatoryCount;
// Push user's language.
if (ExtractName(source, userLangCode, names))
++mandatoryCount;
@ -133,7 +133,7 @@ NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const
// Exclude default name.
if (StringUtf8Multilang::kDefaultCode == code)
return true;
auto const mandatoryNamesEnd = names.begin() + mandatoryCount;
// Exclude languages which are already in container (languages with top priority).
auto const it = find_if(
@ -142,7 +142,7 @@ NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const
if (mandatoryNamesEnd == it)
names.emplace_back(code, name);
return true;
});
@ -281,7 +281,7 @@ void EditableMapObject::SetInternet(Internet internet)
{
m_metadata.Set(feature::Metadata::FMD_INTERNET, DebugPrint(internet));
static const uint32_t wifiType = classif().GetTypeByPath({"internet_access", "wlan"});
static auto const wifiType = classif().GetTypeByPath({"internet_access", "wlan"});
if (m_types.Has(wifiType) && internet != Internet::Wlan)
m_types.Remove(wifiType);

View file

@ -254,7 +254,7 @@ UNIT_TEST(EditableMapObject_SetInternet)
}
EditableMapObject emo;
const uint32_t wifiType = classif().GetTypeByPath({"internet_access", "wlan"});
auto const wifiType = classif().GetTypeByPath({"internet_access", "wlan"});
emo.SetType(wifiType);
auto types = emo.GetTypes();