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-10-20 15:45:07 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:45:57 +0300
commit9c3cc8be68cea1780b00de848f3bf7da859a2931 (patch)
tree24c1a153294e909fda4e093b269b522ca3892a20 /indexer/feature_visibility.cpp
parent33563e317580071a2b06edd0d8cd7264bdbc824a (diff)
[generator] Avoid duplicating for "place" in closed area features that are transformed to point features.
Diffstat (limited to 'indexer/feature_visibility.cpp')
-rw-r--r--indexer/feature_visibility.cpp44
1 files changed, 13 insertions, 31 deletions
diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp
index a32f9b13b9..5e88bb51cc 100644
--- a/indexer/feature_visibility.cpp
+++ b/indexer/feature_visibility.cpp
@@ -404,37 +404,6 @@ pair<int, int> GetDrawableScaleRangeForRules(FeatureBase const & f, int rules)
return GetDrawableScaleRangeForRules(TypesHolder(f), rules);
}
-bool IsHighway(vector<uint32_t> const & types)
-{
- ClassifObject const * pRoot = classif().GetRoot();
-
- for (size_t i = 0; i < types.size(); ++i)
- {
- uint8_t v;
- CHECK(ftype::GetValue(types[i], 0, v), (types[i]));
- {
- if (pRoot->GetObject(v)->GetName() == "highway")
- return true;
- }
- }
-
- return false;
-}
-
-/*
-bool IsJunction(vector<uint32_t> const & types)
-{
- char const * arr[] = { "highway", "motorway_junction" };
- static const uint32_t type = classif().GetTypeByPath(vector<string>(arr, arr + 2));
-
- for (size_t i = 0; i < types.size(); ++i)
- if (types[i] == type)
- return true;
-
- return false;
-}
-*/
-
bool UsePopulationRank(uint32_t type)
{
class CheckerT
@@ -471,4 +440,17 @@ bool UsePopulationRank(uint32_t type)
return (checker.IsMyType(type));
}
+
+void TypeSetChecker::SetType(StringT * beg, StringT * end)
+{
+ m_type = classif().GetTypeByPath(vector<string>(beg, end));
+ m_level = distance(beg, end);
+}
+
+bool TypeSetChecker::IsEqual(uint32_t type) const
+{
+ ftype::TruncValue(type, m_level);
+ return (m_type == type);
+}
+
}