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:
authorvng <viktor.govako@gmail.com>2012-03-03 04:13:29 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:36:15 +0300
commit54165b2adf30ee08717c1136ce83894f2325d5ca (patch)
tree73ca7ea45fa0bfe019214f27c3e053660d30c98d /indexer/categories_holder.hpp
parent0af97743edc0e1f3deaab049c36b4a5f84145aff (diff)
[search] Add only categorized features to search index. Do not add some categories of features without names to search index.
Diffstat (limited to 'indexer/categories_holder.hpp')
-rw-r--r--indexer/categories_holder.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indexer/categories_holder.hpp b/indexer/categories_holder.hpp
index 552b60a3f4..71f96452dc 100644
--- a/indexer/categories_holder.hpp
+++ b/indexer/categories_holder.hpp
@@ -73,8 +73,18 @@ public:
}
}
+ /// Search name for type with preffered language.
+ /// If no name for this language, return first (en) name.
+ /// @return false if no categories for type.
bool GetNameByType(uint32_t type, int8_t lang, string & name) const;
+ inline bool IsTypeExist(uint32_t type) const
+ {
+ // pass any language
+ string dummy;
+ return GetNameByType(type, 0, dummy);
+ }
+
inline void Swap(CategoriesHolder & r)
{
m_type2cat.swap(r.m_type2cat);