| 1000 | } |
| 1001 | |
| 1002 | void EditableMapObject::ApplyBusinessReplacement(uint32_t new_type) |
| 1003 | { |
| 1004 | // Types |
| 1005 | feature::TypesHolder new_feature_types; |
| 1006 | |
| 1007 | new_feature_types.Add(new_type); // Update feature type |
| 1008 | |
| 1009 | std::string wheelchairType = feature::GetReadableWheelchairType(m_types); |
| 1010 | if (!wheelchairType.empty()) |
| 1011 | new_feature_types.SafeAdd(classif().GetTypeByReadableObjectName(wheelchairType)); |
| 1012 | |
| 1013 | std::vector<uint32_t> const buildingTypes = ftypes::IsBuildingChecker::Instance().GetTypes(); |
| 1014 | for (uint32_t const & type : buildingTypes) |
| 1015 | if (m_types.Has(type)) |
| 1016 | new_feature_types.SafeAdd(type); |
| 1017 | |
| 1018 | m_types = new_feature_types; |
| 1019 | |
| 1020 | // Names |
| 1021 | m_name.Clear(); |
| 1022 | |
| 1023 | // Metadata |
| 1024 | feature::Metadata new_metadata; |
| 1025 | |
| 1026 | constexpr MetadataID metadataToKeep[] = {MetadataID::FMD_WHEELCHAIR, MetadataID::FMD_POSTCODE, |
| 1027 | MetadataID::FMD_LEVEL, MetadataID::FMD_ELE, |
| 1028 | MetadataID::FMD_HEIGHT, MetadataID::FMD_MIN_HEIGHT, |
| 1029 | MetadataID::FMD_BUILDING_LEVELS, MetadataID::FMD_BUILDING_MIN_LEVEL}; |
| 1030 | |
| 1031 | for (MetadataID const & metadataID : metadataToKeep) |
| 1032 | new_metadata.Set(metadataID, std::string(m_metadata.Get(metadataID))); |
| 1033 | |
| 1034 | m_metadata = new_metadata; |
| 1035 | } |
| 1036 | |
| 1037 | bool AreObjectsEqualIgnoringStreet(EditableMapObject const & lhs, EditableMapObject const & rhs) |
| 1038 | { |
nothing calls this directly
no test coverage detected