diff --git a/indexer/types_mapping.cpp b/indexer/types_mapping.cpp index 9f6ee1a54e..79a0b40048 100644 --- a/indexer/types_mapping.cpp +++ b/indexer/types_mapping.cpp @@ -33,5 +33,12 @@ void IndexAndTypeMapping::Add(uint32_t ind, uint32_t type) ASSERT_EQUAL ( ind, m_types.size(), () ); m_types.push_back(type); - VERIFY ( m_map.insert(make_pair(type, ind)).second, (classif().GetFullObjectName(type), ind) ); + CHECK ( m_map.insert(make_pair(type, ind)).second, (classif().GetFullObjectName(type), ind) ); +} + +uint32_t IndexAndTypeMapping::GetIndex(uint32_t t) const +{ + MapT::const_iterator i = m_map.find(t); + CHECK ( i != m_map.end(), (t, classif().GetFullObjectName(t)) ); + return i->second; } diff --git a/indexer/types_mapping.hpp b/indexer/types_mapping.hpp index d33a20e1f3..6a1f9bd496 100644 --- a/indexer/types_mapping.hpp +++ b/indexer/types_mapping.hpp @@ -24,10 +24,5 @@ public: return m_types[ind]; } - uint32_t GetIndex(uint32_t t) const - { - MapT::const_iterator i = m_map.find(t); - ASSERT ( i != m_map.end(), () ); - return i->second; - } + uint32_t GetIndex(uint32_t t) const; };