From 2ed1ad2d3d669d9109793199132d9fc1030bca48 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Wed, 13 Jan 2016 10:42:46 +0300 Subject: [PATCH] =?UTF-8?q?Removed=20unused=20GetVisiblePOI,=20because:=20?= =?UTF-8?q?-=20It=20can=E2=80=99t=20process=20area=20features.=20-=20It?= =?UTF-8?q?=E2=80=99s=20already=20used=20in=20the=20drape=20core=20to=20se?= =?UTF-8?q?lect=20visible=20POINT-type=20feature.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- map/framework.cpp | 20 -------------------- map/framework.hpp | 3 --- 2 files changed, 23 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index 6b9cfe9921..0ce859452c 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1668,26 +1668,6 @@ unique_ptr Framework::GetFeatureAtMercatorPoint(m2::PointD const & return pointFt ? move(pointFt) : move(areaFt); } -bool Framework::GetVisiblePOI(m2::PointD const & glbPoint, search::AddressInfo & info, feature::Metadata & metadata) const -{ - ASSERT(m_drapeEngine != nullptr, ()); - FeatureID const id = m_drapeEngine->GetVisiblePOI(glbPoint); - if (!id.IsValid()) - return false; - - auto const feature = GetPOIByID(id); - metadata = feature->GetMetadata(); - info = GetPOIAddressInfo(*feature); - return true; -} - -unique_ptr Framework::GetVisiblePOI(m2::PointD const & ptMercator) const -{ - ASSERT(m_drapeEngine != nullptr, ()); - FeatureID const fid = m_drapeEngine->GetVisiblePOI(ptMercator); - return fid.IsValid() ? GetPOIByID(fid) : unique_ptr(); -} - unique_ptr Framework::GetPOIByID(FeatureID const & fid) const { ASSERT(fid.IsValid(), ()); diff --git a/map/framework.hpp b/map/framework.hpp index adbc5d7517..867d23ecef 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -489,9 +489,6 @@ public: /// TODO(AlexZ): Refactor out other similar methods. /// @returns nullptr if no feature was found at the given mercator point. unique_ptr GetFeatureAtMercatorPoint(m2::PointD const & mercator) const; - bool GetVisiblePOI(m2::PointD const & glbPoint, search::AddressInfo & info, feature::Metadata & metadata) const; - // TODO(AlexZ): Refactor similar getters to share common interface. - unique_ptr GetVisiblePOI(m2::PointD const & ptMercator) const; // TODO(AlexZ): Do we really need to avoid linear features? unique_ptr GetPOIByID(FeatureID const & fid) const; void FindClosestPOIMetadata(m2::PointD const & pt, feature::Metadata & metadata) const;