diff options
author | Ilya Zverev <zverik@textual.ru> | 2015-04-13 12:27:47 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:59:16 +0300 |
commit | b158d4752ff45773c5b2452b7da8d43fc6e21d6c (patch) | |
tree | 19d101928326620d1ee018646115851955d5af26 | |
parent | 70a117f830f0048ad9a809bf0e0079b0a5d92a2c (diff) |
Fix warningsimplementation-edit-mode
-rw-r--r-- | feature_changeset/featurechangeset_upload.cpp | 5 | ||||
-rw-r--r-- | feature_changeset/osm_data.cpp | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/feature_changeset/featurechangeset_upload.cpp b/feature_changeset/featurechangeset_upload.cpp index dd45d7566a..bdf727941e 100644 --- a/feature_changeset/featurechangeset_upload.cpp +++ b/feature_changeset/featurechangeset_upload.cpp @@ -247,9 +247,8 @@ namespace edit } else { - OsmElement *modified(closest); - AddNewTags(modified, changes); - osc.Modify(modified); + AddNewTags(closest, changes); + osc.Modify(closest); } }; } diff --git a/feature_changeset/osm_data.cpp b/feature_changeset/osm_data.cpp index dac11d77b1..f537819baa 100644 --- a/feature_changeset/osm_data.cpp +++ b/feature_changeset/osm_data.cpp @@ -83,17 +83,23 @@ namespace osm { OsmId maxId = 0; if (type == OsmType::NODE) + { for (pair<OsmId, OsmNode> const & p : m_nodes) if ((!newObj && p.first > maxId) || (newObj && p.first < maxId)) maxId = p.first; + } else if (type == OsmType::WAY) + { for (pair<OsmId, OsmWay> const & p : m_ways) if ((!newObj && p.first > maxId) || (newObj && p.first < maxId)) maxId = p.first; + } else if (type == OsmType::RELATION) + { for (pair<OsmId, OsmRelation> const & p : m_relations) if ((!newObj && p.first > maxId) || (newObj && p.first < maxId)) maxId = p.first; + } return newObj ? maxId - 1 : maxId + 1; } |