diff --git a/indexer/feature_utils.hpp b/indexer/feature_utils.hpp index 03545e980c..a5d77b5609 100644 --- a/indexer/feature_utils.hpp +++ b/indexer/feature_utils.hpp @@ -8,6 +8,8 @@ class StringUtf8Multilang; namespace feature { + static constexpr std::string_view kFieldsSeparator = " • "; + // Address house numbers interpolation. enum class InterpolType { None, Odd, Even, Any }; diff --git a/indexer/map_object.cpp b/indexer/map_object.cpp index e55446185f..c4462c4fb0 100644 --- a/indexer/map_object.cpp +++ b/indexer/map_object.cpp @@ -181,12 +181,12 @@ bool MapObject::HasToilets() const string MapObject::FormatCuisines() const { - return strings::JoinStrings(GetLocalizedCuisines(), kFieldsSeparator); + return strings::JoinStrings(GetLocalizedCuisines(), feature::kFieldsSeparator); } string MapObject::FormatRoadShields() const { - return strings::JoinStrings(m_roadShields, kFieldsSeparator); + return strings::JoinStrings(m_roadShields, feature::kFieldsSeparator); } int MapObject::GetStars() const diff --git a/indexer/map_object.hpp b/indexer/map_object.hpp index 15a83b1628..b0c40de2fb 100644 --- a/indexer/map_object.hpp +++ b/indexer/map_object.hpp @@ -33,7 +33,6 @@ Internet InternetFromString(std::string_view inet); class MapObject { public: - static constexpr std::string_view kFieldsSeparator = " • "; static constexpr std::string_view kStarSymbol = "★"; static constexpr std::string_view kToiletsSymbol = "🚻"; static constexpr uint8_t kMaxStarsCount = 7; diff --git a/map/place_page_info.cpp b/map/place_page_info.cpp index fc01a741cf..ab5ae0ad87 100644 --- a/map/place_page_info.cpp +++ b/map/place_page_info.cpp @@ -115,7 +115,7 @@ std::string Info::FormatSubtitle(bool withType) const auto const append = [&result](std::string_view sv) { if (!result.empty()) - result += kFieldsSeparator; + result += feature::kFieldsSeparator; result += sv; }; @@ -226,7 +226,7 @@ void Info::SetTitlesForBookmark() subtitle.push_back(m_bookmarkCategoryName); if (!m_bookmarkData.m_featureTypes.empty()) subtitle.push_back(GetLocalizedFeatureType(m_bookmarkData.m_featureTypes)); - m_uiSubtitle = strings::JoinStrings(subtitle, kFieldsSeparator); + m_uiSubtitle = strings::JoinStrings(subtitle, feature::kFieldsSeparator); } void Info::SetCustomName(std::string const & name) @@ -370,7 +370,7 @@ void Info::SetRoadType(FeatureType & ft, RoadWarningMarkType type, std::string c { if (!m_uiTitle.empty()) { - m_uiTitle += kFieldsSeparator; + m_uiTitle += feature::kFieldsSeparator; m_uiTitle += str; } else @@ -380,7 +380,7 @@ void Info::SetRoadType(FeatureType & ft, RoadWarningMarkType type, std::string c auto const addSubtitle = [this](std::string_view sv) { if (!m_uiSubtitle.empty()) - m_uiSubtitle += kFieldsSeparator; + m_uiSubtitle += feature::kFieldsSeparator; m_uiSubtitle += sv; }; diff --git a/search/intermediate_result.cpp b/search/intermediate_result.cpp index d7463f9122..27907b3c98 100644 --- a/search/intermediate_result.cpp +++ b/search/intermediate_result.cpp @@ -295,29 +295,29 @@ void FillDetails(FeatureType & ft, Result::Details & details) stars.append(osm::MapObject::kStarSymbol); auto const cuisines = feature::GetLocalizedCuisines(typesHolder); - auto const cuisine = strings::JoinStrings(cuisines, osm::MapObject::kFieldsSeparator); + auto const cuisine = strings::JoinStrings(cuisines, feature::kFieldsSeparator); auto const roadShields = ftypes::GetRoadShieldsNames(ft); - auto const roadShield = strings::JoinStrings(roadShields, osm::MapObject::kFieldsSeparator); + auto const roadShield = strings::JoinStrings(roadShields, feature::kFieldsSeparator); auto const fee = feature::GetLocalizedFeeType(typesHolder); std::string description; if (!stars.empty()) - description.append(osm::MapObject::kFieldsSeparator).append(stars); + description.append(feature::kFieldsSeparator).append(stars); if (!airportIata.empty()) - description.append(osm::MapObject::kFieldsSeparator).append(airportIata); + description.append(feature::kFieldsSeparator).append(airportIata); if (!roadShield.empty()) - description.append(osm::MapObject::kFieldsSeparator).append(roadShield); + description.append(feature::kFieldsSeparator).append(roadShield); if (!brand.empty()) - description.append(osm::MapObject::kFieldsSeparator).append(brand); + description.append(feature::kFieldsSeparator).append(brand); if (!cuisine.empty()) - description.append(osm::MapObject::kFieldsSeparator).append(cuisine); + description.append(feature::kFieldsSeparator).append(cuisine); if (feature::HasToilets(typesHolder)) - description.append(osm::MapObject::kFieldsSeparator).append(osm::MapObject::kToiletsSymbol); + description.append(feature::kFieldsSeparator).append(osm::MapObject::kToiletsSymbol); if (!fee.empty()) - description.append(osm::MapObject::kFieldsSeparator).append(fee); + description.append(feature::kFieldsSeparator).append(fee); details.m_description = std::move(description);