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-05-31 03:18:37 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:39:09 +0300
commita65a9d2775ca0dfd0f4f2048ebfa311dfd566b20 (patch)
tree87491841e31368aa9976feb96ca65ecbe1d0800e /indexer/feature_data.cpp
parentae5e7ded22ce5409ca513ef0d8627cefbd5ec88b (diff)
[generator] Fix bug with skipping types for inner boundary relations
(Should skip only boundaries, not all types).
Diffstat (limited to 'indexer/feature_data.cpp')
-rw-r--r--indexer/feature_data.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp
index 98b5a2c110..b1f32a9a9b 100644
--- a/indexer/feature_data.cpp
+++ b/indexer/feature_data.cpp
@@ -96,9 +96,22 @@ uint8_t FeatureParams::GetTypeMask() const
return h;
}
-void FeatureParams::AddTypes(FeatureParams const & rhs)
+void FeatureParams::AddTypes(FeatureParams const & rhs, uint32_t skipType2)
{
- m_Types.insert(m_Types.end(), rhs.m_Types.begin(), rhs.m_Types.end());
+ if (skipType2 == 0)
+ {
+ m_Types.insert(m_Types.end(), rhs.m_Types.begin(), rhs.m_Types.end());
+ }
+ else
+ {
+ for (size_t i = 0; i < rhs.m_Types.size(); ++i)
+ {
+ uint32_t t = rhs.m_Types[i];
+ ftype::TruncValue(t, 2);
+ if (t != skipType2)
+ m_Types.push_back(t);
+ }
+ }
}
void FeatureParams::FinishAddingTypes()