diff options
author | Alex Zolotarev <alex@maps.me> | 2016-02-15 15:36:56 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:21:17 +0300 |
commit | 10acff2d6e175c74c79d34e48b1d34ff08ed0b09 (patch) | |
tree | a622f07e04176b8561a4f434ab21822057a514a2 /indexer/feature_meta.hpp | |
parent | 96807088bf27c3790e26c085c4f290ee0a65d341 (diff) |
feature::Metadata::Has() for convenience.
Diffstat (limited to 'indexer/feature_meta.hpp')
-rw-r--r-- | indexer/feature_meta.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indexer/feature_meta.hpp b/indexer/feature_meta.hpp index 7569ae613b..b0a26b27bc 100644 --- a/indexer/feature_meta.hpp +++ b/indexer/feature_meta.hpp @@ -34,9 +34,15 @@ protected: } public: + bool Has(uint8_t type) const + { + auto const it = m_metadata.find(type); + return it != m_metadata.end(); + } + string Get(uint8_t type) const { - auto it = m_metadata.find(type); + auto const it = m_metadata.find(type); return (it == m_metadata.end()) ? string() : it->second; } |