diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2019-04-17 14:12:52 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2019-04-18 16:53:21 +0300 |
commit | 0b9a22ea84872625ef8a5c90cbdf3ae0c51a5e6c (patch) | |
tree | e4766d9b8f96ac02c80b2a395b1024ee70e64c93 /editor | |
parent | 585e1eec5af5b868e958a862724cfedd1b49f1be (diff) |
[indexer] enum feature::EGeomType is changed to enum class feature::GeomType
Diffstat (limited to 'editor')
-rw-r--r-- | editor/edits_migration.cpp | 4 | ||||
-rw-r--r-- | editor/osm_editor.cpp | 7 | ||||
-rw-r--r-- | editor/xml_feature.cpp | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/editor/edits_migration.cpp b/editor/edits_migration.cpp index 2ece6d96c6..c5967136f6 100644 --- a/editor/edits_migration.cpp +++ b/editor/edits_migration.cpp @@ -26,7 +26,7 @@ FeatureID MigrateNodeFeatureIndex(osm::Editor::ForEachFeaturesNearByFn & forEach auto count = 0; forEach( [&fid, &count](FeatureType const & ft) { - if (ft.GetFeatureType() != feature::GEOM_POINT) + if (ft.GetGeomType() != feature::GeomType::Point) return; // TODO(mgsergio): Check that ft and xml correspond to the same feature. fid = ft.GetID(); @@ -64,7 +64,7 @@ FeatureID MigrateWayOrRelatonFeatureIndex( forEach( [&fid, &geometry, &count, &bestScore](FeatureType & ft) { - if (ft.GetFeatureType() != feature::GEOM_AREA) + if (ft.GetGeomType() != feature::GeomType::Area) return; ++count; auto ftGeometry = ft.GetTriangesAsPoints(FeatureType::BEST_GEOMETRY); diff --git a/editor/osm_editor.cpp b/editor/osm_editor.cpp index f188365e15..4f724f83f3 100644 --- a/editor/osm_editor.cpp +++ b/editor/osm_editor.cpp @@ -46,7 +46,7 @@ using namespace std; using namespace pugi; -using feature::EGeomType; +using feature::GeomType; using feature::Metadata; using editor::XMLFeature; @@ -141,8 +141,9 @@ bool AreObjectsEqualButStreet(osm::EditableMapObject const & lhs, XMLFeature GetMatchingFeatureFromOSM(osm::ChangesetWrapper & cw, osm::EditableMapObject & o) { - ASSERT_NOT_EQUAL(o.GetGeomType(), feature::GEOM_LINE, ("Line features are not supported yet.")); - if (o.GetGeomType() == feature::GEOM_POINT) + ASSERT_NOT_EQUAL(o.GetGeomType(), feature::GeomType::Line, + ("Line features are not supported yet.")); + if (o.GetGeomType() == feature::GeomType::Point) return cw.GetMatchingNodeFeatureFromOSM(o.GetMercator()); auto geometry = o.GetTriangesAsPoints(); diff --git a/editor/xml_feature.cpp b/editor/xml_feature.cpp index e6e7d57484..48eeab5cbc 100644 --- a/editor/xml_feature.cpp +++ b/editor/xml_feature.cpp @@ -401,7 +401,7 @@ void ApplyPatch(XMLFeature const & xml, osm::EditableMapObject & object) XMLFeature ToXML(osm::EditableMapObject const & object, bool serializeType) { - bool const isPoint = object.GetGeomType() == feature::GEOM_POINT; + bool const isPoint = object.GetGeomType() == feature::GeomType::Point; XMLFeature toFeature(isPoint ? XMLFeature::Type::Node : XMLFeature::Type::Way); if (isPoint) |