diff options
author | vng <viktor.govako@gmail.com> | 2012-04-19 16:21:46 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:37:39 +0300 |
commit | 32f645d73204c31b71edcc4938fe5921cc09eedf (patch) | |
tree | 7de646226bef21db849b9598fec9501a48fa122f /map/address_finder.cpp | |
parent | 0632edae1a22b032251b363d90007c61dbf4b1b3 (diff) |
Rename some functions according to coding style.
Diffstat (limited to 'map/address_finder.cpp')
-rw-r--r-- | map/address_finder.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index 94f409cf52..1f985f2db2 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -1,6 +1,7 @@ #include "framework.hpp" #include "../indexer/classificator.hpp" +#include "../indexer/feature_visibility.hpp" namespace @@ -42,7 +43,11 @@ namespace { protected: virtual double GetResultDistance(double d, feature::TypesHolder const & types) const = 0; - virtual double NeedProcess(feature::TypesHolder const & types) const = 0; + virtual double NeedProcess(feature::TypesHolder const & types) const + { + pair<int, int> const r = feature::GetDrawableScaleRange(types); + return my::between_s(r.first, r.second, m_scale); + } static double GetCompareEpsilonImpl(feature::EGeomType type, double eps) { @@ -109,10 +114,6 @@ namespace { return (d + GetCompareEpsilonImpl(types.GetGeoType(), m_eps)); } - virtual double NeedProcess(feature::TypesHolder const &) const - { - return true; - } public: DoGetFeatureTypes(m2::PointD const & pt, double eps, int scale) @@ -271,6 +272,9 @@ namespace } virtual double NeedProcess(feature::TypesHolder const & types) const { + if (!DoGetFeatureInfoBase::NeedProcess(types)) + return false; + return (!m_doLocalities || (types.GetGeoType() == feature::GEOM_POINT && m_checker.IsLocality(types))); } |