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>2011-03-11 01:54:50 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:13:18 +0300
commitee406ece0c354c0650690d8c76a5bb1aa4198099 (patch)
treeb24dc1643b1a0bfb9eb4ec1e3ef15871a2605d9c /indexer/feature.cpp
parent7b9871b5a8d140548341397734014d02b6b38185 (diff)
Code for feature uniting is more generic now.
Define any types for unite processing in WorldMapGenerator.
Diffstat (limited to 'indexer/feature.cpp')
-rw-r--r--indexer/feature.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indexer/feature.cpp b/indexer/feature.cpp
index 106515e78b..64cd18bf74 100644
--- a/indexer/feature.cpp
+++ b/indexer/feature.cpp
@@ -68,6 +68,22 @@ void FeatureBuilder1::AddName(string const & name)
m_Name = name;
}
+bool FeatureBuilder1::IsTypeExist(uint32_t t) const
+{
+ return (find(m_Types.begin(), m_Types.end(), t) != m_Types.end());
+}
+
+bool FeatureBuilder1::AssignType_SetDifference(vector<uint32_t> const & diffTypes)
+{
+ vector<uint32_t> src;
+ src.swap(m_Types);
+
+ sort(src.begin(), src.end());
+ set_difference(src.begin(), src.end(), diffTypes.begin(), diffTypes.end(), back_inserter(m_Types));
+
+ return !m_Types.empty();
+}
+
void FeatureBuilder1::AddLayer(int32_t layer)
{
int const bound = 10;