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/classificator.hpp | |
parent | 07d95abd471a2f4423b2b473d138d59a1a1085dd (diff) |
Minor refactoring - use “initializer_list” for getting classificator types.
Diffstat (limited to 'indexer/classificator.hpp')
-rw-r--r-- | indexer/classificator.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indexer/classificator.hpp b/indexer/classificator.hpp index 910b5eaa63..05e156e30c 100644 --- a/indexer/classificator.hpp +++ b/indexer/classificator.hpp @@ -9,6 +9,7 @@ #include "../std/iostream.hpp" #include "../std/bitset.hpp" #include "../std/noncopyable.hpp" +#include "../std/initializer_list.hpp" class ClassifObject; @@ -184,10 +185,14 @@ public: /// Return type by path in classificator tree, for example /// path = ["natural", "caostline"]. //@{ +private: + template <class IterT> uint32_t GetTypeByPathImpl(IterT beg, IterT end) const; +public: /// @return 0 in case of nonexisting type uint32_t GetTypeByPathSafe(vector<string> const & path) const; - /// Shows ASSERT in case of nonexisting type + /// Invokes ASSERT in case of nonexisting type uint32_t GetTypeByPath(vector<string> const & path) const; + uint32_t GetTypeByPath(initializer_list<char const *> const & lst) const; //@} uint32_t GetIndexForType(uint32_t t) const { return m_mapping.GetIndex(t); } |