Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-09-20 17:44:28 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:43:29 +0300
commitcdc487b5cfcb4ed5fb066dafb643cc66d7cfbee8 (patch)
tree55690a524a7344444da689f9f0348902da138342 /indexer/feature_visibility.cpp
parentf54438b19ec294232eac95bdf20a16c94f62ba66 (diff)
Do NOT filter types for area features (They combine all drawing rules).
Diffstat (limited to 'indexer/feature_visibility.cpp')
-rw-r--r--indexer/feature_visibility.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp
index db0c5cc953..78fad1f28a 100644
--- a/indexer/feature_visibility.cpp
+++ b/indexer/feature_visibility.cpp
@@ -259,32 +259,19 @@ namespace
class CheckNonDrawableType
{
Classificator & m_c;
- FeatureGeoType m_arr[3];
- size_t m_count;
+ FeatureGeoType m_type;
public:
CheckNonDrawableType(FeatureGeoType ft)
- : m_c(classif()), m_count(0)
+ : m_c(classif()), m_type(ft)
{
- if (ft < FEATURE_TYPE_LINE_AREA)
- m_arr[m_count++] = ft;
- else
- {
- ASSERT_EQUAL ( ft, FEATURE_TYPE_LINE_AREA, () );
- m_arr[m_count++] = FEATURE_TYPE_LINE;
- m_arr[m_count++] = FEATURE_TYPE_AREA;
- }
}
bool operator() (uint32_t t)
{
- for (size_t i = 0; i < m_count; ++i)
- {
- IsDrawableLikeChecker doCheck(m_arr[i]);
- if (m_c.ProcessObjects(t, doCheck))
- return false;
- }
- return true;
+ IsDrawableLikeChecker doCheck(m_type);
+ // return true if need to delete
+ return !m_c.ProcessObjects(t, doCheck);
}
};
}