mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 05:43:37 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
|
||||
enum SearchMarkPoint::SearchMarkType : uint8_t
|
||||
{
|
||||
Default = 0,
|
||||
@@ -90,66 +89,65 @@ float const kVisitedSymbolOpacity = 0.7f;
|
||||
float const kOutOfFiltersSymbolOpacity = 0.4f;
|
||||
|
||||
std::array<std::string, SearchMarkType::Count> const kSymbols = {
|
||||
"search-result", // Default.
|
||||
"search-result-hotel", // Hotel.
|
||||
"search-result-hostel", // Hostel.
|
||||
"search-result-chalet", // Chalet.
|
||||
"search-result-apartment", // Apartment.
|
||||
"search-result-campsite", // Campsite.
|
||||
"search-result-caravan-site", // Caravan site.
|
||||
"search-result-cafe", // Cafe.
|
||||
"search-result-bakery", // Bakery.
|
||||
"search-result-bar", // Bar.
|
||||
"search-result-pub", // Pub.
|
||||
"search-result-restaurant", // Restaurant.
|
||||
"search-result-fastfood", // FastFood.
|
||||
"search-result-casino", // Casino.
|
||||
"search-result-lottery", // Lottery.
|
||||
"search-result-cinema", // Cinema.
|
||||
"search-result-theatre", // Theatre.
|
||||
"search-result-stadium", // Stadium.
|
||||
"search-result-museum", // Museum.
|
||||
"search-result-art", // Art.
|
||||
"search-result-attraction", // Attraction.
|
||||
"search-result-viewpoint", // Viewpoint.
|
||||
"search-result-remains", // Remains.
|
||||
"search-result-archaeological-site", // ArchaeologicalSite.
|
||||
"search-result-information", // Information.
|
||||
"search-result-marketplace", // Marketplace.
|
||||
"search-result-nightclub", // Nightclub.
|
||||
"search-result-playground", // Playground.
|
||||
"search-result-bank", // Bank.
|
||||
"search-result-fuel", // Fuel.
|
||||
"search-result-charging_station", // ChargingStation.
|
||||
"search-result-shop-alcohol", // ShopAlcohol.
|
||||
"search-result-shop-butcher", // ShopButcher.
|
||||
"search-result-shop-clothes", // ShopClothes.
|
||||
"search-result-shop-confectionery", // ShopConfectionery.
|
||||
"search-result-shop-convenience", // ShopConvenience.
|
||||
"search-result-shop-beauty", // ShopBeauty.
|
||||
"search-result-shop-department_store", // ShopDepartmentStore.
|
||||
"search-result-shop-gift", // ShopGift.
|
||||
"search-result-shop-greengrocer", // ShopGreengrocer.
|
||||
"search-result-shop-jewelry", // ShopJewelry.
|
||||
"search-result-shop-seafood", // ShopSeafood.
|
||||
"search-result-shop-shoes", // ShopShoes.
|
||||
"search-result-shop-sports", // ShopSports.
|
||||
"search-result-shop-supermarket", // ShopSupermarket.
|
||||
"search-result-shop-toys", // ShopToys.
|
||||
"search-result-theme-park", // ThemePark.
|
||||
"search-result-zoo", // Zoo.
|
||||
"search-result-pitch", // Pitch.
|
||||
"search-result-swimming", // Swimming.
|
||||
"search-result-hospital", // Hospital.
|
||||
"search-result-clinic", // Clinic.
|
||||
"search-result-pharmacy", // Pharmacy.
|
||||
"search-result-drinking-water", // DrinkingWater.
|
||||
"search-result-drinking-water-no", // DrinkingWaterNo.
|
||||
"search-result-bicycle_parking", // BicycleParking.
|
||||
"search-result-bicycle_parking-covered",// BicycleParkingCovered.
|
||||
"search-result-bicycle_rental", // BicycleRental.
|
||||
"search-result", // Default.
|
||||
"search-result-hotel", // Hotel.
|
||||
"search-result-hostel", // Hostel.
|
||||
"search-result-chalet", // Chalet.
|
||||
"search-result-apartment", // Apartment.
|
||||
"search-result-campsite", // Campsite.
|
||||
"search-result-caravan-site", // Caravan site.
|
||||
"search-result-cafe", // Cafe.
|
||||
"search-result-bakery", // Bakery.
|
||||
"search-result-bar", // Bar.
|
||||
"search-result-pub", // Pub.
|
||||
"search-result-restaurant", // Restaurant.
|
||||
"search-result-fastfood", // FastFood.
|
||||
"search-result-casino", // Casino.
|
||||
"search-result-lottery", // Lottery.
|
||||
"search-result-cinema", // Cinema.
|
||||
"search-result-theatre", // Theatre.
|
||||
"search-result-stadium", // Stadium.
|
||||
"search-result-museum", // Museum.
|
||||
"search-result-art", // Art.
|
||||
"search-result-attraction", // Attraction.
|
||||
"search-result-viewpoint", // Viewpoint.
|
||||
"search-result-remains", // Remains.
|
||||
"search-result-archaeological-site", // ArchaeologicalSite.
|
||||
"search-result-information", // Information.
|
||||
"search-result-marketplace", // Marketplace.
|
||||
"search-result-nightclub", // Nightclub.
|
||||
"search-result-playground", // Playground.
|
||||
"search-result-bank", // Bank.
|
||||
"search-result-fuel", // Fuel.
|
||||
"search-result-charging_station", // ChargingStation.
|
||||
"search-result-shop-alcohol", // ShopAlcohol.
|
||||
"search-result-shop-butcher", // ShopButcher.
|
||||
"search-result-shop-clothes", // ShopClothes.
|
||||
"search-result-shop-confectionery", // ShopConfectionery.
|
||||
"search-result-shop-convenience", // ShopConvenience.
|
||||
"search-result-shop-beauty", // ShopBeauty.
|
||||
"search-result-shop-department_store", // ShopDepartmentStore.
|
||||
"search-result-shop-gift", // ShopGift.
|
||||
"search-result-shop-greengrocer", // ShopGreengrocer.
|
||||
"search-result-shop-jewelry", // ShopJewelry.
|
||||
"search-result-shop-seafood", // ShopSeafood.
|
||||
"search-result-shop-shoes", // ShopShoes.
|
||||
"search-result-shop-sports", // ShopSports.
|
||||
"search-result-shop-supermarket", // ShopSupermarket.
|
||||
"search-result-shop-toys", // ShopToys.
|
||||
"search-result-theme-park", // ThemePark.
|
||||
"search-result-zoo", // Zoo.
|
||||
"search-result-pitch", // Pitch.
|
||||
"search-result-swimming", // Swimming.
|
||||
"search-result-hospital", // Hospital.
|
||||
"search-result-clinic", // Clinic.
|
||||
"search-result-pharmacy", // Pharmacy.
|
||||
"search-result-drinking-water", // DrinkingWater.
|
||||
"search-result-drinking-water-no", // DrinkingWaterNo.
|
||||
"search-result-bicycle_parking", // BicycleParking.
|
||||
"search-result-bicycle_parking-covered", // BicycleParkingCovered.
|
||||
"search-result-bicycle_rental", // BicycleRental.
|
||||
|
||||
|
||||
"non-found-search-result", // NotFound.
|
||||
};
|
||||
|
||||
@@ -185,114 +183,114 @@ private:
|
||||
{
|
||||
auto const & c = classif();
|
||||
std::pair<std::vector<std::string_view>, SearchMarkType> const table[] = {
|
||||
{{"amenity", "cafe"}, SearchMarkType::Cafe},
|
||||
{{"shop", "bakery"}, SearchMarkType::Bakery},
|
||||
{{"shop", "pastry"}, SearchMarkType::Bakery},
|
||||
{{"amenity", "bar"}, SearchMarkType::Bar},
|
||||
{{"amenity", "pub"}, SearchMarkType::Pub},
|
||||
{{"amenity", "biergarten"}, SearchMarkType::Pub},
|
||||
{{"amenity", "restaurant"}, SearchMarkType::Restaurant},
|
||||
{{"amenity", "food_court"}, SearchMarkType::Restaurant},
|
||||
{{"amenity", "fast_food"}, SearchMarkType::FastFood},
|
||||
{{"amenity", "casino"}, SearchMarkType::Casino},
|
||||
{{"shop", "bookmaker"}, SearchMarkType::Lottery},
|
||||
{{"shop", "lottery"}, SearchMarkType::Lottery},
|
||||
{{"amenity", "cinema"}, SearchMarkType::Cinema},
|
||||
{{"amenity", "theatre"}, SearchMarkType::Theatre},
|
||||
{{"leisure", "stadium"}, SearchMarkType::Stadium},
|
||||
{{"tourism", "museum"}, SearchMarkType::Museum},
|
||||
{{"amenity", "arts_centre"}, SearchMarkType::Art},
|
||||
{{"tourism", "gallery"}, SearchMarkType::Art},
|
||||
{{"tourism", "attraction"}, SearchMarkType::Attraction},
|
||||
{{"tourism", "viewpoint"}, SearchMarkType::Viewpoint},
|
||||
{{"historic", "fort"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "castrum"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "fortified_church"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "fortress"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "hillfort"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "kremlin"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "manor"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "palace"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "shiro"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "defensive"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "stately"}, SearchMarkType::Remains},
|
||||
{{"historic", "ruins"}, SearchMarkType::Remains},
|
||||
{{"historic", "city_gate"}, SearchMarkType::Remains},
|
||||
{{"historic", "archaeological_site"}, SearchMarkType::ArchaeologicalSite},
|
||||
{{"tourism", "information"}, SearchMarkType::Information},
|
||||
{{"tourism", "information", "office"}, SearchMarkType::Information},
|
||||
{{"tourism", "information", "visitor_centre"}, SearchMarkType::Information},
|
||||
{{"amenity", "marketplace"}, SearchMarkType::Marketplace},
|
||||
{{"amenity", "nightclub"}, SearchMarkType::Nightclub},
|
||||
{{"leisure", "playground"}, SearchMarkType::Playground},
|
||||
{{"amenity", "bank"}, SearchMarkType::Bank},
|
||||
{{"shop", "money_lender"}, SearchMarkType::Bank},
|
||||
{{"amenity", "fuel"}, SearchMarkType::Fuel},
|
||||
{{"amenity", "charging_station"}, SearchMarkType::ChargingStation},
|
||||
{{"amenity", "charging_station", "bicycle"}, SearchMarkType::ChargingStation},
|
||||
{{"amenity", "charging_station", "motorcar"}, SearchMarkType::ChargingStation},
|
||||
{{"shop", "alcohol"}, SearchMarkType::ShopAlcohol},
|
||||
{{"shop", "beverages"}, SearchMarkType::ShopAlcohol},
|
||||
{{"shop", "wine"}, SearchMarkType::ShopAlcohol},
|
||||
{{"shop", "butcher"}, SearchMarkType::ShopButcher},
|
||||
{{"shop", "clothes"}, SearchMarkType::ShopClothes},
|
||||
{{"shop", "confectionery"}, SearchMarkType::ShopConfectionery},
|
||||
{{"shop", "chocolate"}, SearchMarkType::ShopConfectionery},
|
||||
{{"craft", "confectionery"}, SearchMarkType::ShopConfectionery},
|
||||
{{"shop", "convenience"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "grocery"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "deli"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "farm"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "health_food"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "beauty"}, SearchMarkType::ShopBeauty},
|
||||
{{"shop", "cosmetics"}, SearchMarkType::ShopBeauty},
|
||||
{{"shop", "department_store"}, SearchMarkType::ShopDepartmentStore},
|
||||
{{"shop", "gift"}, SearchMarkType::ShopGift},
|
||||
{{"shop", "greengrocer"}, SearchMarkType::ShopGreengrocer},
|
||||
{{"shop", "jewelry"}, SearchMarkType::ShopJewelry},
|
||||
{{"shop", "seafood"}, SearchMarkType::ShopSeafood},
|
||||
{{"shop", "shoes"}, SearchMarkType::ShopShoes},
|
||||
{{"craft", "shoemaker"}, SearchMarkType::ShopShoes},
|
||||
{{"shop", "sports"}, SearchMarkType::ShopSports},
|
||||
{{"shop", "supermarket"}, SearchMarkType::ShopSupermarket},
|
||||
{{"shop", "toys"}, SearchMarkType::ShopToys},
|
||||
{{"tourism", "theme_park"}, SearchMarkType::ThemePark},
|
||||
{{"tourism", "zoo"}, SearchMarkType::Zoo},
|
||||
{{"tourism", "chalet"}, SearchMarkType::Chalet},
|
||||
{{"tourism", "alpine_hut"}, SearchMarkType::Chalet},
|
||||
{{"tourism", "wilderness_hut"},SearchMarkType::Chalet},
|
||||
{{"tourism", "hotel"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "motel"}, SearchMarkType::Hotel},
|
||||
{{"leisure", "resort"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "hostel"}, SearchMarkType::Hostel},
|
||||
{{"tourism", "apartment"}, SearchMarkType::Apartment},
|
||||
{{"tourism", "guest_house"}, SearchMarkType::Apartment},
|
||||
{{"tourism", "camp_site"}, SearchMarkType::Campsite},
|
||||
{{"tourism", "caravan_site"}, SearchMarkType::CaravanSite},
|
||||
{{"amenity", "hospital"}, SearchMarkType::Hospital},
|
||||
{{"amenity", "clinic"}, SearchMarkType::Clinic},
|
||||
{{"amenity", "doctors"}, SearchMarkType::Clinic},
|
||||
{{"amenity", "pharmacy"}, SearchMarkType::Pharmacy},
|
||||
{{"leisure", "pitch"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "ice_rink"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "sports_centre"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "sports_hall"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "swimming_pool"}, SearchMarkType::Swimming},
|
||||
{{"leisure", "water_park"}, SearchMarkType::Swimming},
|
||||
{{"amenity", "drinking_water"}, SearchMarkType::DrinkingWater},
|
||||
{{"amenity", "water_point"}, SearchMarkType::DrinkingWater},
|
||||
{{"man_made", "water_tap"}, SearchMarkType::DrinkingWater},
|
||||
{{"man_made", "water_well"}, SearchMarkType::DrinkingWater},
|
||||
{{"natural", "spring"}, SearchMarkType::DrinkingWater},
|
||||
{{"natural", "hot_spring"}, SearchMarkType::DrinkingWater},
|
||||
{{"amenity", "water_point", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"man_made", "water_tap", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"man_made", "water_well", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"natural", "spring", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"amenity", "bicycle_parking"}, SearchMarkType::BicycleParking},
|
||||
{{"amenity", "bicycle_parking", "covered"}, SearchMarkType::BicycleParkingCovered},
|
||||
{{"amenity", "bicycle_rental"}, SearchMarkType::BicycleRental},
|
||||
{{"amenity", "cafe"}, SearchMarkType::Cafe},
|
||||
{{"shop", "bakery"}, SearchMarkType::Bakery},
|
||||
{{"shop", "pastry"}, SearchMarkType::Bakery},
|
||||
{{"amenity", "bar"}, SearchMarkType::Bar},
|
||||
{{"amenity", "pub"}, SearchMarkType::Pub},
|
||||
{{"amenity", "biergarten"}, SearchMarkType::Pub},
|
||||
{{"amenity", "restaurant"}, SearchMarkType::Restaurant},
|
||||
{{"amenity", "food_court"}, SearchMarkType::Restaurant},
|
||||
{{"amenity", "fast_food"}, SearchMarkType::FastFood},
|
||||
{{"amenity", "casino"}, SearchMarkType::Casino},
|
||||
{{"shop", "bookmaker"}, SearchMarkType::Lottery},
|
||||
{{"shop", "lottery"}, SearchMarkType::Lottery},
|
||||
{{"amenity", "cinema"}, SearchMarkType::Cinema},
|
||||
{{"amenity", "theatre"}, SearchMarkType::Theatre},
|
||||
{{"leisure", "stadium"}, SearchMarkType::Stadium},
|
||||
{{"tourism", "museum"}, SearchMarkType::Museum},
|
||||
{{"amenity", "arts_centre"}, SearchMarkType::Art},
|
||||
{{"tourism", "gallery"}, SearchMarkType::Art},
|
||||
{{"tourism", "attraction"}, SearchMarkType::Attraction},
|
||||
{{"tourism", "viewpoint"}, SearchMarkType::Viewpoint},
|
||||
{{"historic", "fort"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "castrum"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "fortified_church"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "fortress"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "hillfort"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "kremlin"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "manor"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "palace"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "shiro"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "defensive"}, SearchMarkType::Remains},
|
||||
{{"historic", "castle", "stately"}, SearchMarkType::Remains},
|
||||
{{"historic", "ruins"}, SearchMarkType::Remains},
|
||||
{{"historic", "city_gate"}, SearchMarkType::Remains},
|
||||
{{"historic", "archaeological_site"}, SearchMarkType::ArchaeologicalSite},
|
||||
{{"tourism", "information"}, SearchMarkType::Information},
|
||||
{{"tourism", "information", "office"}, SearchMarkType::Information},
|
||||
{{"tourism", "information", "visitor_centre"}, SearchMarkType::Information},
|
||||
{{"amenity", "marketplace"}, SearchMarkType::Marketplace},
|
||||
{{"amenity", "nightclub"}, SearchMarkType::Nightclub},
|
||||
{{"leisure", "playground"}, SearchMarkType::Playground},
|
||||
{{"amenity", "bank"}, SearchMarkType::Bank},
|
||||
{{"shop", "money_lender"}, SearchMarkType::Bank},
|
||||
{{"amenity", "fuel"}, SearchMarkType::Fuel},
|
||||
{{"amenity", "charging_station"}, SearchMarkType::ChargingStation},
|
||||
{{"amenity", "charging_station", "bicycle"}, SearchMarkType::ChargingStation},
|
||||
{{"amenity", "charging_station", "motorcar"}, SearchMarkType::ChargingStation},
|
||||
{{"shop", "alcohol"}, SearchMarkType::ShopAlcohol},
|
||||
{{"shop", "beverages"}, SearchMarkType::ShopAlcohol},
|
||||
{{"shop", "wine"}, SearchMarkType::ShopAlcohol},
|
||||
{{"shop", "butcher"}, SearchMarkType::ShopButcher},
|
||||
{{"shop", "clothes"}, SearchMarkType::ShopClothes},
|
||||
{{"shop", "confectionery"}, SearchMarkType::ShopConfectionery},
|
||||
{{"shop", "chocolate"}, SearchMarkType::ShopConfectionery},
|
||||
{{"craft", "confectionery"}, SearchMarkType::ShopConfectionery},
|
||||
{{"shop", "convenience"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "grocery"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "deli"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "farm"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "health_food"}, SearchMarkType::ShopConvenience},
|
||||
{{"shop", "beauty"}, SearchMarkType::ShopBeauty},
|
||||
{{"shop", "cosmetics"}, SearchMarkType::ShopBeauty},
|
||||
{{"shop", "department_store"}, SearchMarkType::ShopDepartmentStore},
|
||||
{{"shop", "gift"}, SearchMarkType::ShopGift},
|
||||
{{"shop", "greengrocer"}, SearchMarkType::ShopGreengrocer},
|
||||
{{"shop", "jewelry"}, SearchMarkType::ShopJewelry},
|
||||
{{"shop", "seafood"}, SearchMarkType::ShopSeafood},
|
||||
{{"shop", "shoes"}, SearchMarkType::ShopShoes},
|
||||
{{"craft", "shoemaker"}, SearchMarkType::ShopShoes},
|
||||
{{"shop", "sports"}, SearchMarkType::ShopSports},
|
||||
{{"shop", "supermarket"}, SearchMarkType::ShopSupermarket},
|
||||
{{"shop", "toys"}, SearchMarkType::ShopToys},
|
||||
{{"tourism", "theme_park"}, SearchMarkType::ThemePark},
|
||||
{{"tourism", "zoo"}, SearchMarkType::Zoo},
|
||||
{{"tourism", "chalet"}, SearchMarkType::Chalet},
|
||||
{{"tourism", "alpine_hut"}, SearchMarkType::Chalet},
|
||||
{{"tourism", "wilderness_hut"}, SearchMarkType::Chalet},
|
||||
{{"tourism", "hotel"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "motel"}, SearchMarkType::Hotel},
|
||||
{{"leisure", "resort"}, SearchMarkType::Hotel},
|
||||
{{"tourism", "hostel"}, SearchMarkType::Hostel},
|
||||
{{"tourism", "apartment"}, SearchMarkType::Apartment},
|
||||
{{"tourism", "guest_house"}, SearchMarkType::Apartment},
|
||||
{{"tourism", "camp_site"}, SearchMarkType::Campsite},
|
||||
{{"tourism", "caravan_site"}, SearchMarkType::CaravanSite},
|
||||
{{"amenity", "hospital"}, SearchMarkType::Hospital},
|
||||
{{"amenity", "clinic"}, SearchMarkType::Clinic},
|
||||
{{"amenity", "doctors"}, SearchMarkType::Clinic},
|
||||
{{"amenity", "pharmacy"}, SearchMarkType::Pharmacy},
|
||||
{{"leisure", "pitch"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "ice_rink"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "sports_centre"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "sports_hall"}, SearchMarkType::Pitch},
|
||||
{{"leisure", "swimming_pool"}, SearchMarkType::Swimming},
|
||||
{{"leisure", "water_park"}, SearchMarkType::Swimming},
|
||||
{{"amenity", "drinking_water"}, SearchMarkType::DrinkingWater},
|
||||
{{"amenity", "water_point"}, SearchMarkType::DrinkingWater},
|
||||
{{"man_made", "water_tap"}, SearchMarkType::DrinkingWater},
|
||||
{{"man_made", "water_well"}, SearchMarkType::DrinkingWater},
|
||||
{{"natural", "spring"}, SearchMarkType::DrinkingWater},
|
||||
{{"natural", "hot_spring"}, SearchMarkType::DrinkingWater},
|
||||
{{"amenity", "water_point", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"man_made", "water_tap", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"man_made", "water_well", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"natural", "spring", "drinking_water_no"}, SearchMarkType::DrinkingWaterNo},
|
||||
{{"amenity", "bicycle_parking"}, SearchMarkType::BicycleParking},
|
||||
{{"amenity", "bicycle_parking", "covered"}, SearchMarkType::BicycleParkingCovered},
|
||||
{{"amenity", "bicycle_rental"}, SearchMarkType::BicycleRental},
|
||||
};
|
||||
|
||||
m_searchMarkTypes.reserve(std::size(table));
|
||||
@@ -313,15 +311,14 @@ SearchMarkType GetSearchMarkType(uint32_t type)
|
||||
} // namespace
|
||||
|
||||
SearchMarkPoint::SearchMarkPoint(m2::PointD const & ptOrg)
|
||||
: UserMark(ptOrg, UserMark::Type::SEARCH)
|
||||
, m_type(SearchMarkType::Default)
|
||||
, m_isPreparing(false)
|
||||
, m_hasSale(false)
|
||||
, m_isSelected(false)
|
||||
, m_isVisited(false)
|
||||
, m_isAvailable(true)
|
||||
{
|
||||
}
|
||||
: UserMark(ptOrg, UserMark::Type::SEARCH)
|
||||
, m_type(SearchMarkType::Default)
|
||||
, m_isPreparing(false)
|
||||
, m_hasSale(false)
|
||||
, m_isSelected(false)
|
||||
, m_isVisited(false)
|
||||
, m_isAvailable(true)
|
||||
{}
|
||||
|
||||
m2::PointD SearchMarkPoint::GetPixelOffset() const
|
||||
{
|
||||
@@ -397,7 +394,12 @@ void SearchMarkPoint::SetNotFoundType()
|
||||
SetAttributeValue(m_type, SearchMarkType::NotFound);
|
||||
}
|
||||
|
||||
#define SET_BOOL_ATTRIBUTE(dest, src) if (dest != src) { dest = src; SetDirty(); }
|
||||
#define SET_BOOL_ATTRIBUTE(dest, src) \
|
||||
if (dest != src) \
|
||||
{ \
|
||||
dest = src; \
|
||||
SetDirty(); \
|
||||
}
|
||||
|
||||
void SearchMarkPoint::SetPreparing(bool isPreparing)
|
||||
{
|
||||
@@ -431,13 +433,25 @@ void SearchMarkPoint::SetReason(std::string const & reason)
|
||||
SetAttributeValue(m_reason, reason);
|
||||
}
|
||||
|
||||
bool SearchMarkPoint::IsSelected() const { return m_isSelected; }
|
||||
bool SearchMarkPoint::IsSelected() const
|
||||
{
|
||||
return m_isSelected;
|
||||
}
|
||||
|
||||
bool SearchMarkPoint::IsAvailable() const { return m_isAvailable; }
|
||||
bool SearchMarkPoint::IsAvailable() const
|
||||
{
|
||||
return m_isAvailable;
|
||||
}
|
||||
|
||||
std::string const & SearchMarkPoint::GetReason() const { return m_reason; }
|
||||
std::string const & SearchMarkPoint::GetReason() const
|
||||
{
|
||||
return m_reason;
|
||||
}
|
||||
|
||||
bool SearchMarkPoint::HasReason() const { return !m_reason.empty(); }
|
||||
bool SearchMarkPoint::HasReason() const
|
||||
{
|
||||
return !m_reason.empty();
|
||||
}
|
||||
|
||||
std::string const * SearchMarkPoint::GetSymbolName() const
|
||||
{
|
||||
@@ -468,9 +482,7 @@ std::string const * SearchMarkPoint::GetSymbolName() const
|
||||
// static
|
||||
std::map<std::string, m2::PointF> SearchMarks::s_markSizes;
|
||||
|
||||
SearchMarks::SearchMarks()
|
||||
: m_bmManager(nullptr)
|
||||
{}
|
||||
SearchMarks::SearchMarks() : m_bmManager(nullptr) {}
|
||||
|
||||
void SearchMarks::SetDrapeEngine(ref_ptr<df::DrapeEngine> engine)
|
||||
{
|
||||
@@ -545,10 +557,8 @@ void SearchMarks::SetSales(std::vector<FeatureID> const & features, bool hasSale
|
||||
bool SearchMarks::IsThereSearchMarkForFeature(FeatureID const & featureId) const
|
||||
{
|
||||
for (auto const markId : m_bmManager->GetUserMarkIds(UserMark::Type::SEARCH))
|
||||
{
|
||||
if (m_bmManager->GetUserMark(markId)->GetFeatureID() == featureId)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -635,10 +645,10 @@ bool SearchMarks::IsSelected(FeatureID const & id) const
|
||||
|
||||
void SearchMarks::ClearTrackedProperties()
|
||||
{
|
||||
// {
|
||||
// std::scoped_lock<std::mutex> lock(m_lock);
|
||||
// m_unavailable.clear();
|
||||
// }
|
||||
// {
|
||||
// std::scoped_lock<std::mutex> lock(m_lock);
|
||||
// m_unavailable.clear();
|
||||
// }
|
||||
m_selectedFeature = {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user