diff options
author | Yuri Gorshenin <y@maps.me> | 2016-07-07 14:13:08 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-07-07 14:13:08 +0300 |
commit | 16a991d75b6cbb23d312f3c782ce0054ea0cddd0 (patch) | |
tree | 1d9c8206d4ab7e71b6e53ef65d7fc892c61332c1 /map | |
parent | 6c8f97bb0b9b21eb16f2a7cf41c31598fc10bf80 (diff) |
Style fixes.
Diffstat (limited to 'map')
-rw-r--r-- | map/address_finder.cpp | 2 | ||||
-rw-r--r-- | map/framework.cpp | 13 | ||||
-rw-r--r-- | map/framework.hpp | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index a10a431f55..825dce4609 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -479,7 +479,7 @@ search::AddressInfo Framework::GetAddressInfoAtPoint(m2::PointD const & pt) cons search::AddressInfo Framework::GetFeatureAddressInfo(FeatureID const & fid) const { FeatureType ft; - if (!GetFeatureByID(fid, true /* parse */, ft)) + if (!GetFeatureByID(fid, ft)) return {}; return GetFeatureAddressInfo(ft); } diff --git a/map/framework.cpp b/map/framework.cpp index 467e116b27..6a570172ad 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1350,7 +1350,7 @@ void Framework::LoadSearchResultMetadata(search::Result & res) const // TODO @yunikkk refactor to format search result metadata accordingly with place_page::Info FeatureType ft; - if (!GetFeatureByID(id, true /* parse */, ft)) + if (!GetFeatureByID(id, ft)) return; search::ProcessMetadata(ft, res.m_metadata); @@ -1900,7 +1900,7 @@ unique_ptr<FeatureType> Framework::GetFeatureAtPoint(m2::PointD const & mercator return poi ? move(poi) : (area ? move(area) : move(line)); } -bool Framework::GetFeatureByID(FeatureID const & fid, bool parse, FeatureType & ft) const +bool Framework::GetFeatureByID(FeatureID const & fid, FeatureType & ft) const { ASSERT(fid.IsValid(), ()); @@ -1908,8 +1908,7 @@ bool Framework::GetFeatureByID(FeatureID const & fid, bool parse, FeatureType & if (!guard.GetFeatureByIndex(fid.m_index, ft)) return false; - if (parse) - ft.ParseEverything(); + ft.ParseEverything(); return true; } @@ -2616,7 +2615,7 @@ bool Framework::ParseEditorDebugCommand(search::SearchParams const & params) FeatureID const & fid = edit.first; FeatureType ft; - if (!GetFeatureByID(fid, true /* parse */, ft)) + if (!GetFeatureByID(fid, ft)) { LOG(LERROR, ("Feature can't be loaded:", fid)); return true; @@ -2806,7 +2805,7 @@ bool Framework::GetEditableMapObject(FeatureID const & fid, osm::EditableMapObje return false; FeatureType ft; - if (!GetFeatureByID(fid, true /* parse */, ft)) + if (!GetFeatureByID(fid, ft)) return false; emo.SetFromFeatureType(ft); @@ -2967,7 +2966,7 @@ void Framework::DeleteFeature(FeatureID const & fid) const // TODO(AlexZ): Use FeatureID in the editor interface. FeatureType ft; - if (!GetFeatureByID(fid, true /* parse */, ft)) + if (!GetFeatureByID(fid, ft)) return; osm::Editor::Instance().DeleteFeature(ft); diff --git a/map/framework.hpp b/map/framework.hpp index 6581a3da4b..c411734a1b 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -541,7 +541,7 @@ public: /// Set parse to false if you don't need all feature fields ready. /// TODO(AlexZ): Refactor code which uses this method to get rid of it. /// FeatureType instances shoud not be used outside ForEach* core methods. - WARN_UNUSED_RESULT bool GetFeatureByID(FeatureID const & fid, bool parse, FeatureType & ft) const; + WARN_UNUSED_RESULT bool GetFeatureByID(FeatureID const & fid, FeatureType & ft) const; void MemoryWarning(); void EnterBackground(); |