From 49391088270feed1efc9a48ab3d1bf577157fa50 Mon Sep 17 00:00:00 2001 From: vng Date: Fri, 26 Dec 2014 11:38:35 +0300 Subject: [generator] Filter equal place-xxx features nearby. --- indexer/feature_data.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indexer/feature_data.cpp') diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 2488338e8a..bb36d54d62 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -306,6 +306,18 @@ bool FeatureParams::IsTypeExist(uint32_t t) const return (find(m_Types.begin(), m_Types.end(), t) != m_Types.end()); } +uint32_t FeatureParams::FindType(uint32_t comp, uint8_t level) const +{ + for (uint32_t const type : m_Types) + { + uint32_t t = type; + ftype::TruncValue(t, level); + if (t == comp) + return type; + } + return ftype::GetEmptyValue(); +} + bool FeatureParams::CheckValid() const { CHECK(!m_Types.empty() && m_Types.size() <= max_types_count, ()); -- cgit v1.2.3