diff options
author | vng <viktor.govako@gmail.com> | 2015-01-29 12:15:44 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:36:38 +0300 |
commit | 136995a8e0ab70bf10f19a255dc49d67600f8048 (patch) | |
tree | c51e2895c5cbebbf0cc4d4755b702c7c74ffbeff /indexer/feature_visibility.cpp | |
parent | 819857fdd268d9010b0e7e6ef855cf5c84bd3cb8 (diff) |
Use range base for in feature::TypesHolder.
Diffstat (limited to 'indexer/feature_visibility.cpp')
-rw-r--r-- | indexer/feature_visibility.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index ac14aa459b..2c431ff38c 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -132,8 +132,8 @@ pair<int, bool> GetDrawRule(FeatureBase const & f, int level, Classificator const & c = classif(); DrawRuleGetter doRules(level, types.GetGeoType(), keys); - for (size_t i = 0; i < types.Size(); ++i) - (void)c.ProcessObjects(types[i], doRules); + for (uint32_t t : types) + (void)c.ProcessObjects(t, doRules); return make_pair(types.GetGeoType(), types.Has(c.GetCoastType())); } @@ -281,8 +281,8 @@ bool IsDrawableForIndex(FeatureBase const & f, int level) return false; IsDrawableChecker doCheck(level); - for (size_t i = 0; i < types.Size(); ++i) - if (c.ProcessObjects(types[i], doCheck)) + for (uint32_t t : types) + if (c.ProcessObjects(t, doCheck)) return true; return false; @@ -388,8 +388,8 @@ pair<int, int> GetDrawableScaleRange(TypesHolder const & types) { pair<int, int> res(1000, -1000); - for (size_t i = 0; i < types.Size(); ++i) - AddRange(res, GetDrawableScaleRange(types[i])); + for (uint32_t t : types) + AddRange(res, GetDrawableScaleRange(t)); return (res.first > res.second ? make_pair(-1, -1) : res); } @@ -401,8 +401,8 @@ namespace Classificator const & c = classif(); IsDrawableRulesChecker doCheck(level, types.GetGeoType(), rules); - for (size_t i = 0; i < types.Size(); ++i) - if (c.ProcessObjects(types[i], doCheck)) + for (uint32_t t : types) + if (c.ProcessObjects(t, doCheck)) return true; return false; |