From 7f710060e5e782ff19f9624bfdc4699759bb5a5b Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 2 Dec 2013 14:28:54 +0100 Subject: [PATCH] Removed dummy debug parameter. --- indexer/feature_visibility.cpp | 39 +++++++++++-------------- indexer/feature_visibility.hpp | 4 ++- map/benchmark_tool/features_loading.cpp | 3 +- map/feature_styler.cpp | 3 +- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index 4d9c09fcce..024947077f 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -102,32 +102,18 @@ namespace int m_scale; ClassifObject::FeatureGeoType m_ft; drule::KeysT & m_keys; -#ifdef DEBUG - string & m_name; -#endif public: DrawRuleGetter(int scale, feature::EGeomType ft, - drule::KeysT & keys -#ifdef DEBUG - , string & name -#endif - ) + drule::KeysT & keys) : m_scale(scale), m_ft(ClassifObject::FeatureGeoType(ft)), m_keys(keys) -#ifdef DEBUG - , m_name(name) -#endif { } typedef bool ResultType; - void operator() (ClassifObject const * p) + void operator() (ClassifObject const *) { -#ifdef DEBUG - if (!m_name.empty()) m_name += '-'; - m_name += p->GetName(); -#endif } bool operator() (ClassifObject const * p, bool & res) { @@ -139,24 +125,33 @@ namespace } pair GetDrawRule(FeatureBase const & f, int level, - drule::KeysT & keys, string & names) + drule::KeysT & keys) { feature::TypesHolder types(f); ASSERT ( keys.empty(), () ); Classificator const & c = classif(); - DrawRuleGetter doRules(level, types.GetGeoType(), keys -#ifdef DEBUG - , names -#endif - ); + DrawRuleGetter doRules(level, types.GetGeoType(), keys); for (size_t i = 0; i < types.Size(); ++i) (void)c.ProcessObjects(types[i], doRules); return make_pair(types.GetGeoType(), types.Has(c.GetCoastType())); } +void GetDrawRule(vector const & types, int level, int geoType, + drule::KeysT & keys) + +{ + ASSERT ( keys.empty(), () ); + Classificator const & c = classif(); + + DrawRuleGetter doRules(level, EGeomType(geoType), keys); + + for (size_t i = 0; i < types.size(); ++i) + (void)c.ProcessObjects(types[i], doRules); +} + namespace { class IsDrawableChecker diff --git a/indexer/feature_visibility.hpp b/indexer/feature_visibility.hpp index f3d6440c6f..c7d75b5588 100644 --- a/indexer/feature_visibility.hpp +++ b/indexer/feature_visibility.hpp @@ -58,7 +58,9 @@ namespace feature /// @return (geometry type, is coastline) pair GetDrawRule(FeatureBase const & f, int level, - drule::KeysT & keys, string & names); + drule::KeysT & keys); + void GetDrawRule(vector const & types, int level, int geoType, + drule::KeysT & keys); /// Used to check whether user types belong to particular classificator set. class TypeSetChecker diff --git a/map/benchmark_tool/features_loading.cpp b/map/benchmark_tool/features_loading.cpp index ba9d18e0fa..f7af7b3dfe 100644 --- a/map/benchmark_tool/features_loading.cpp +++ b/map/benchmark_tool/features_loading.cpp @@ -44,8 +44,7 @@ namespace m_timer.Reset(); drule::KeysT keys; - string names; // for debug use only, in release it's empty - (void)feature::GetDrawRule(ft, m_scale, keys, names); + (void)feature::GetDrawRule(ft, m_scale, keys); if (!keys.empty()) { diff --git a/map/feature_styler.cpp b/map/feature_styler.cpp index 58db70aa03..3f7692a602 100644 --- a/map/feature_styler.cpp +++ b/map/feature_styler.cpp @@ -52,8 +52,7 @@ namespace di m_rect(rect) { drule::KeysT keys; - string names; // for debug use only, in release it's empty - pair type = feature::GetDrawRule(f, zoom, keys, names); + pair type = feature::GetDrawRule(f, zoom, keys); // don't try to do anything to invisible feature if (keys.empty())