From ab8ffff250704d729ec6cc42696f202cf0dceba6 Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Fri, 12 May 2017 14:44:59 +0300 Subject: [PATCH] review fixes --- indexer/osm_editor.cpp | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index c38a12c5ed..b3d1e0d0c7 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -1081,26 +1081,8 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, ostringstream sstr; auto canCreate = true; - sstr << "User\'s comment: "; - if (note.empty()) - sstr << "- ;" << endl; - else - sstr << note << ';' << endl; - - sstr << "Poi name: "; - if (defaultName.empty()) - sstr << "- ;" << endl; - else - sstr << defaultName << ';' << endl; - - sstr << "Poi types: "; - for (auto const & type : holder.ToObjectNames()) - { - sstr << type << ' '; - } - sstr << ';' << endl; - - sstr << "OSM data version: " << stringVersion << ';' << endl; + if (!note.empty()) + sstr << "\"" << note << "\"" << endl; switch (type) { @@ -1121,6 +1103,20 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, case NoteProblemType::General: break; } + if (defaultName.empty()) + sstr << "POI has no name" << endl; + else + sstr << "POI name: " << defaultName << endl; + + sstr << "POI types:"; + for (auto const & type : holder.ToObjectNames()) + { + sstr << ' ' << type; + } + sstr << endl; + + sstr << "OSM data version: " << stringVersion << endl; + if (canCreate) m_notes->CreateNote(latLon, sstr.str()); }