diff options
author | Maxim Pimenov <m@maps.me> | 2015-06-17 20:21:17 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:52:10 +0300 |
commit | d616887a9875d6c7a9b6059cfb00300458b76daf (patch) | |
tree | fb17d5dd7ef304d47f661c7886b8f7a51466d8f2 /indexer/feature_visibility.cpp | |
parent | 93dcd65744b6af1e405d77aa50f53fa20a8fb633 (diff) |
Review fixes.
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 2c06ca5eb8..3bb29a993f 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -272,20 +272,20 @@ bool IsDrawableLike(vector<uint32_t> const & types, EGeomType ft) bool IsDrawableForIndex(FeatureBase const & f, int level) { + return IsDrawableForIndexGeometryOnly(f, level) && IsDrawableForIndexClassifOnly(f, level); +} + +bool IsDrawableForIndexGeometryOnly(FeatureBase const & f, int level) +{ Classificator const & c = classif(); TypesHolder const types(f); - if (types.GetGeoType() == GEOM_AREA && !types.Has(c.GetCoastType())) - if (!scales::IsGoodForLevel(level, f.GetLimitRect())) + if (types.GetGeoType() == GEOM_AREA && !types.Has(c.GetCoastType()) && + !scales::IsGoodForLevel(level, f.GetLimitRect())) return false; - IsDrawableChecker doCheck(level); - for (uint32_t t : types) - if (c.ProcessObjects(t, doCheck)) - return true; - - return false; + return true; } bool IsDrawableForIndexClassifOnly(FeatureBase const & f, int level) |