| 36 | namespace |
| 37 | { |
| 38 | bool ExtractName(StringUtf8Multilang const & names, localisation::LanguageIndex const languageIndex, vector<osm::LocalizedName> & result) |
| 39 | { |
| 40 | if (localisation::kUnsupportedLanguageIndex == languageIndex) |
| 41 | return false; |
| 42 | |
| 43 | // Exclude languages that are already present. |
| 44 | auto const it = base::FindIf( |
| 45 | result, [languageIndex](osm::LocalizedName const & localizedName) { return localizedName.m_languageIndex == languageIndex; }); |
| 46 | |
| 47 | if (result.end() != it) |
| 48 | return false; |
| 49 | |
| 50 | string_view name; |
| 51 | names.GetString(languageIndex, name); |
| 52 | result.emplace_back(languageIndex, std::string{name}); |
| 53 | |
| 54 | return true; |
| 55 | } |
| 56 | std::string GetCurrentDate() |
| 57 | { |
| 58 | auto const t = std::time(nullptr); |
no test coverage detected