diff options
author | Maxim Pimenov <m@maps.me> | 2016-04-26 17:02:16 +0300 |
---|---|---|
committer | Maxim Pimenov <m@maps.me> | 2016-04-26 18:54:48 +0300 |
commit | 9243f3130a86b17f140399d26fe24a5ee124a64f (patch) | |
tree | 60ba1c5f803a7073de27eb73ca1045b304466dce /indexer/categories_index.hpp | |
parent | 360bafbc2907788a3893792fb6dd366d3eb48e44 (diff) |
Review fixes.
Diffstat (limited to 'indexer/categories_index.hpp')
-rw-r--r-- | indexer/categories_index.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indexer/categories_index.hpp b/indexer/categories_index.hpp index 0429976096..09859499ad 100644 --- a/indexer/categories_index.hpp +++ b/indexer/categories_index.hpp @@ -16,7 +16,7 @@ namespace indexer class CategoriesIndex { public: - using Category = CategoriesHolder::Category; + using TCategory = CategoriesHolder::Category; CategoriesIndex() : m_catHolder(GetDefaultCategories()) {} @@ -36,21 +36,22 @@ public: void AddAllCategoriesInLang(int8_t lang); // Adds all categories from data/classificator.txt. - void AddAllCategoriesAllLangs(); + void AddAllCategoriesInAllLangs(); // Returns all categories that have |query| as a substring. Note // that all synonyms for a category are contained in a returned // value even if only one language was used when adding this // category's name to index. // Beware weird results when query is a malformed UTF-8 string. - void GetCategories(string const & query, vector<Category> & result); + void GetCategories(string const & query, vector<TCategory> & result) const; // Returns all types that match to categories that have |query| as substring. // Beware weird results when query is a malformed UTF-8 string. - void GetAssociatedTypes(string const & query, vector<uint32_t> & result); + // Note: no types are returned if the query is empty. + void GetAssociatedTypes(string const & query, vector<uint32_t> & result) const; #ifdef DEBUG - int GetNumTrieNodes() { return m_trie.GetNumNodes(); } + inline int GetNumTrieNodes() const { return m_trie.GetNumNodes(); } #endif private: |