Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2016-04-27 19:44:11 +0300
committerAlex Zolotarev <alex@maps.me>2016-05-01 10:28:03 +0300
commit9d7fc9dbbe1a2fc816c5afa049b8eab4f827bb2c (patch)
tree3727ff3da3c9ba50a26d7671093c3a4d7d4e44bf /indexer/categories_index.cpp
parent920f2577a35aba443ee33abf36050f7d0c66a505 (diff)
[ios] Implemented new category search.
Diffstat (limited to 'indexer/categories_index.cpp')
-rw-r--r--indexer/categories_index.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indexer/categories_index.cpp b/indexer/categories_index.cpp
index 08696151b0..3582e6e074 100644
--- a/indexer/categories_index.cpp
+++ b/indexer/categories_index.cpp
@@ -52,6 +52,7 @@ namespace indexer
{
void CategoriesIndex::AddCategoryByTypeAndLang(uint32_t type, int8_t lang)
{
+ ASSERT(lang >= 1 && lang <= CategoriesHolder::kNumLanguages, ("Invalid lang code:", lang));
m_catHolder->ForEachNameByType(type, [&](TCategory::Name const & name)
{
if (name.m_locale == lang)
@@ -67,6 +68,7 @@ void CategoriesIndex::AddCategoryByTypeAllLangs(uint32_t type)
void CategoriesIndex::AddAllCategoriesInLang(int8_t lang)
{
+ ASSERT(lang >= 1 && lang <= CategoriesHolder::kNumLanguages, ("Invalid lang code:", lang));
m_catHolder->ForEachTypeAndCategory([&](uint32_t type, TCategory const & cat)
{
for (auto const & name : cat.m_synonyms)