diff options
author | vng <viktor.govako@gmail.com> | 2014-10-30 13:21:52 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:31:55 +0300 |
commit | a471524c3f19e1fa20e5e634f7a3933c7f3a039a (patch) | |
tree | 8532143f7edccd4fdaffac7f1113aeacf47bd3f5 /indexer/feature_visibility.hpp | |
parent | 07d95abd471a2f4423b2b473d138d59a1a1085dd (diff) |
Minor refactoring - use “initializer_list” for getting classificator types.
Diffstat (limited to 'indexer/feature_visibility.hpp')
-rw-r--r-- | indexer/feature_visibility.hpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/indexer/feature_visibility.hpp b/indexer/feature_visibility.hpp index facb8c6723..266896f254 100644 --- a/indexer/feature_visibility.hpp +++ b/indexer/feature_visibility.hpp @@ -8,6 +8,7 @@ #include "../std/vector.hpp" #include "../std/string.hpp" #include "../std/utility.hpp" +#include "../std/initializer_list.hpp" class FeatureBase; @@ -58,15 +59,8 @@ namespace feature uint32_t m_type; uint8_t m_level; - typedef char const * StringT; - void SetType(StringT * beg, StringT * end); - public: - /// Construct by classificator set name. - //@{ - TypeSetChecker(StringT name) { SetType(&name, &name + 1); } - TypeSetChecker(StringT arr[], size_t n) { SetType(arr, arr + n); } - //@} + explicit TypeSetChecker(initializer_list<char const *> const & lst); bool IsEqual(uint32_t type) const; template <class IterT> bool IsEqualR(IterT beg, IterT end) const |