diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-04-27 17:07:07 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2016-05-01 10:28:03 +0300 |
commit | 21e50e2d5e3f2fca71cc4da012e6d2687ed773a2 (patch) | |
tree | 75d7ca72b65b36452c85da23fc6e53a32dce066e /indexer/categories_index.cpp | |
parent | 60f44c06991d632771a6ed7c83077c312f5cd65f (diff) |
[indexer] Added move assignment operator for CategoriesIndex.
Diffstat (limited to 'indexer/categories_index.cpp')
-rw-r--r-- | indexer/categories_index.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/indexer/categories_index.cpp b/indexer/categories_index.cpp index 50c698286b..08696151b0 100644 --- a/indexer/categories_index.cpp +++ b/indexer/categories_index.cpp @@ -52,11 +52,11 @@ namespace indexer { void CategoriesIndex::AddCategoryByTypeAndLang(uint32_t type, int8_t lang) { - m_catHolder.ForEachNameByType(type, [&](TCategory::Name const & name) - { - if (name.m_locale == lang) - TokenizeAndAddAllSubstrings(m_trie, name.m_name, type); - }); + m_catHolder->ForEachNameByType(type, [&](TCategory::Name const & name) + { + if (name.m_locale == lang) + TokenizeAndAddAllSubstrings(m_trie, name.m_name, type); + }); } void CategoriesIndex::AddCategoryByTypeAllLangs(uint32_t type) @@ -67,23 +67,23 @@ void CategoriesIndex::AddCategoryByTypeAllLangs(uint32_t type) void CategoriesIndex::AddAllCategoriesInLang(int8_t lang) { - m_catHolder.ForEachTypeAndCategory([&](uint32_t type, TCategory const & cat) - { - for (auto const & name : cat.m_synonyms) - { - if (name.m_locale == lang) - TokenizeAndAddAllSubstrings(m_trie, name.m_name, type); - } - }); + m_catHolder->ForEachTypeAndCategory([&](uint32_t type, TCategory const & cat) + { + for (auto const & name : cat.m_synonyms) + { + if (name.m_locale == lang) + TokenizeAndAddAllSubstrings(m_trie, name.m_name, type); + } + }); } void CategoriesIndex::AddAllCategoriesInAllLangs() { - m_catHolder.ForEachTypeAndCategory([this](uint32_t type, TCategory const & cat) - { - for (auto const & name : cat.m_synonyms) - TokenizeAndAddAllSubstrings(m_trie, name.m_name, type); - }); + m_catHolder->ForEachTypeAndCategory([this](uint32_t type, TCategory const & cat) + { + for (auto const & name : cat.m_synonyms) + TokenizeAndAddAllSubstrings(m_trie, name.m_name, type); + }); } void CategoriesIndex::GetCategories(string const & query, vector<TCategory> & result) const @@ -91,11 +91,11 @@ void CategoriesIndex::GetCategories(string const & query, vector<TCategory> & re vector<uint32_t> types; GetAssociatedTypes(query, types); my::SortUnique(types); - m_catHolder.ForEachTypeAndCategory([&](uint32_t type, TCategory const & cat) - { - if (binary_search(types.begin(), types.end(), type)) - result.push_back(cat); - }); + m_catHolder->ForEachTypeAndCategory([&](uint32_t type, TCategory const & cat) + { + if (binary_search(types.begin(), types.end(), type)) + result.push_back(cat); + }); } void CategoriesIndex::GetAssociatedTypes(string const & query, vector<uint32_t> & result) const |