diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-01-17 14:16:25 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2018-01-17 16:15:57 +0300 |
commit | cc0b8c40e8866d9b4e6ec24a396cf84e5ba7b534 (patch) | |
tree | e86a38a6484d825513710f72b8224c01bbf76c1a /indexer/osm_editor.cpp | |
parent | 4aba5f361266d4a4d1ca266ab3f9590a2d2d99eb (diff) |
[editor] relations are allowed for editing
Diffstat (limited to 'indexer/osm_editor.cpp')
-rw-r--r-- | indexer/osm_editor.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index d2c4a5439c..03cf10ffdb 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -62,9 +62,8 @@ constexpr char const * kAddrStreetTag = "addr:street"; constexpr char const * kUploaded = "Uploaded"; constexpr char const * kDeletedFromOSMServer = "Deleted from OSM by someone"; -constexpr char const * kRelationsAreNotSupported = "Relations are not supported yet"; constexpr char const * kNeedsRetry = "Needs Retry"; -constexpr char const * kWrongMatch = "Matched feature has no tags"; +constexpr char const * kMatchedFeatureIsEmpty = "Matched feature has no tags"; struct XmlSection { @@ -119,10 +118,7 @@ bool NeedsUpload(string const & uploadStatus) { return uploadStatus != kUploaded && uploadStatus != kDeletedFromOSMServer && - // TODO: Remove this line when relations are supported. - uploadStatus != kRelationsAreNotSupported && - // TODO: Remove this when we have better matching algorithm. - uploadStatus != kWrongMatch; + uploadStatus != kMatchedFeatureIsEmpty; } /// Compares editable fields connected with feature ignoring street. @@ -772,8 +768,7 @@ void Editor::UploadChanges(string const & key, string const & secret, TChangeset continue; } - XMLFeature osmFeature = GetMatchingFeatureFromOSM( - changeset, *originalFeaturePtr); + XMLFeature osmFeature = GetMatchingFeatureFromOSM(changeset, *originalFeaturePtr); XMLFeature const osmFeatureCopy = osmFeature; osmFeature.ApplyPatch(feature); // Check to avoid uploading duplicates into OSM. @@ -815,16 +810,9 @@ void Editor::UploadChanges(string const & key, string const & secret, TChangeset ++errorsCount; LOG(LWARNING, (ex.what())); } - catch (ChangesetWrapper::RelationFeatureAreNotSupportedException const & ex) - { - fti.m_uploadStatus = kRelationsAreNotSupported; - fti.m_uploadError = ex.Msg(); - ++errorsCount; - LOG(LWARNING, (ex.what())); - } catch (ChangesetWrapper::EmptyFeatureException const & ex) { - fti.m_uploadStatus = kWrongMatch; + fti.m_uploadStatus = kMatchedFeatureIsEmpty; fti.m_uploadError = ex.Msg(); ++errorsCount; LOG(LWARNING, (ex.what())); |