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>2014-04-01 19:18:52 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:14:06 +0300
commitb1eabf79ee6dbaa675eb08909d8900a263726479 (patch)
tree77f2b278cb37fa80f9afb99076100eed6f2d6cf5 /indexer/feature_data.hpp
parent5f441c5e9270c95ff94b1364929cf779de7e4252 (diff)
[generator] Remove names for "boundary-administrative-*" features.
Diffstat (limited to 'indexer/feature_data.hpp')
-rw-r--r--indexer/feature_data.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp
index eaec4371b1..af9230fec6 100644
--- a/indexer/feature_data.hpp
+++ b/indexer/feature_data.hpp
@@ -9,6 +9,7 @@
#include "../std/string.hpp"
#include "../std/vector.hpp"
+#include "../std/algorithm.hpp"
class FeatureBase;
@@ -92,7 +93,21 @@ namespace feature
}
//@}
+ template <class FnT> bool RemoveIf(FnT fn)
+ {
+ if (m_size > 0)
+ {
+ size_t const oldSize = m_size;
+
+ uint32_t * e = remove_if(m_types, m_types + m_size, fn);
+ m_size = distance(m_types, e);
+
+ return (m_size != oldSize);
+ }
+ return false;
+ }
void Remove(uint32_t t);
+
string DebugPrint() const;
/// Sort types by it's specification (more detailed type goes first).