diff options
author | Alex Zolotarev <alex@maps.me> | 2016-02-16 19:58:28 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:21:20 +0300 |
commit | ef52d80f847be0e9c6996905bd7d82c0cbe980a2 (patch) | |
tree | 2e86a8a560303afd2fb60233a0cdc7c06875d117 /indexer/categories_holder.hpp | |
parent | 49b7fc3226865d6c56163c4532b2489dd38413bc (diff) |
Minor CategoriesHolder renaming.
Diffstat (limited to 'indexer/categories_holder.hpp')
-rw-r--r-- | indexer/categories_holder.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indexer/categories_holder.hpp b/indexer/categories_holder.hpp index feaad857d5..0af32fb181 100644 --- a/indexer/categories_holder.hpp +++ b/indexer/categories_holder.hpp @@ -15,7 +15,7 @@ class CategoriesHolder public: struct Category { - static const uint8_t EMPTY_PREFIX_LENGTH = 10; + static constexpr uint8_t kEmptyPrefixLength = 10; struct Name { @@ -48,14 +48,14 @@ public: void LoadFromStream(istream & s); template <class ToDo> - void ForEachCategory(ToDo toDo) const + void ForEachCategory(ToDo && toDo) const { for (IteratorT i = m_type2cat.begin(); i != m_type2cat.end(); ++i) toDo(*i->second); } template <class ToDo> - void ForEachName(ToDo toDo) const + void ForEachName(ToDo && toDo) const { for (IteratorT i = m_type2cat.begin(); i != m_type2cat.end(); ++i) for (size_t j = 0; j < i->second->m_synonyms.size(); ++j) @@ -63,7 +63,7 @@ public: } template <class ToDo> - void ForEachTypeByName(int8_t locale, StringT const & name, ToDo toDo) const + void ForEachTypeByName(int8_t locale, StringT const & name, ToDo && toDo) const { typedef typename Name2CatContT::const_iterator IterT; @@ -90,7 +90,7 @@ public: /// Converts any language locale from UI to internal integer code static int8_t MapLocaleToInteger(string const & locale); - static int8_t const UNSUPPORTED_LOCALE_CODE = -1; + static constexpr int8_t kUnsupportedLocaleCode = -1; private: void AddCategory(Category & cat, vector<uint32_t> & types); |