diff options
author | Alex Zolotarev <alex@maps.me> | 2016-02-10 12:29:55 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:17:06 +0300 |
commit | 17c8837136b877fe4678f49dc8f5cf395d257e93 (patch) | |
tree | f377c4feed0169cd44507e3529f7d59e336f0425 /indexer/feature_data.cpp | |
parent | d509601df4041ea66bc906dae104a3a642ea42b6 (diff) |
DebugPrint(TypesHolder).
Diffstat (limited to 'indexer/feature_data.cpp')
-rw-r--r-- | indexer/feature_data.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index fd5c8c524c..94a459219d 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -16,6 +16,18 @@ using namespace feature; // TypesHolder implementation //////////////////////////////////////////////////////////////////////////////////// +namespace feature +{ +string DebugPrint(TypesHolder const & holder) +{ + Classificator const & c = classif(); + string s; + for (uint32_t type : holder) + s += c.GetFullObjectName(type) + " "; + return s; +} +} // namespace feature + TypesHolder::TypesHolder(FeatureBase const & f) : m_size(0), m_geoType(f.GetFeatureType()) { @@ -25,19 +37,9 @@ TypesHolder::TypesHolder(FeatureBase const & f) }); } -string TypesHolder::DebugPrint() const -{ - Classificator const & c = classif(); - - string s; - for (uint32_t t : *this) - s += c.GetFullObjectName(t) + " "; - return s; -} - -void TypesHolder::Remove(uint32_t t) +void TypesHolder::Remove(uint32_t type) { - (void) RemoveIf(EqualFunctor<uint32_t>(t)); + UNUSED_VALUE(RemoveIf(EqualFunctor<uint32_t>(type))); } bool TypesHolder::Equals(TypesHolder const & other) const @@ -444,8 +446,8 @@ bool FeatureParams::FinishAddingTypes() m_Types.swap(newTypes); - if (m_Types.size() > max_types_count) - m_Types.resize(max_types_count); + if (m_Types.size() > kMaxTypesCount) + m_Types.resize(kMaxTypesCount); return !m_Types.empty(); } @@ -489,7 +491,7 @@ uint32_t FeatureParams::FindType(uint32_t comp, uint8_t level) const bool FeatureParams::CheckValid() const { - CHECK(!m_Types.empty() && m_Types.size() <= max_types_count, ()); + CHECK(!m_Types.empty() && m_Types.size() <= kMaxTypesCount, ()); CHECK_NOT_EQUAL(m_geomType, 0xFF, ()); return FeatureParamsBase::CheckValid(); |