@todo Can't change on string_view now, because of unordered_map Affiliations.
| 240 | |
| 241 | /// @todo Can't change on string_view now, because of unordered_map<string> Affiliations. |
| 242 | [[nodiscard]] bool GetAffiliationName(FeatureType & ft, string & affiliation) |
| 243 | { |
| 244 | string_view name = ft.GetName(localisation::kDefaultNameIndex); |
| 245 | if (name.empty()) |
| 246 | { |
| 247 | // As a best effort, we try to read an english name if default name is absent. |
| 248 | name = ft.GetName(localisation::kEnglishLanguageIndex); |
| 249 | if (name.empty()) |
| 250 | { |
| 251 | affiliation.clear(); |
| 252 | return false; |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | affiliation = name; |
| 257 | return true; |
| 258 | } |
| 259 | |
| 260 | double Area(m2::RectD const & rect) |
| 261 | { |
no test coverage detected