diff options
author | vng <viktor.govako@gmail.com> | 2014-12-26 11:38:35 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:36:01 +0300 |
commit | 49391088270feed1efc9a48ab3d1bf577157fa50 (patch) | |
tree | f943e1cddaad160f5763a0e0abd53c63f1b8ed8c /indexer/feature_data.cpp | |
parent | 56db1951c81653c24758081ad6cc2e5a4d050933 (diff) |
[generator] Filter equal place-xxx features nearby.
Diffstat (limited to 'indexer/feature_data.cpp')
-rw-r--r-- | indexer/feature_data.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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, ()); |