diff options
author | vng <viktor.govako@gmail.com> | 2012-10-09 03:57:11 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:45:01 +0300 |
commit | 80da0c28a93480f4f3539cac16650f5c733a6d08 (patch) | |
tree | 14f7e026e3ffee82212fc141094e48657264d054 /indexer/types_mapping.cpp | |
parent | 874d8aeb900f7443b10ae2c8cfa617caa97f8d29 (diff) |
[generator] Add more logging to CHECKs.
Diffstat (limited to 'indexer/types_mapping.cpp')
-rw-r--r-- | indexer/types_mapping.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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; } |