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>2014-09-04 18:30:36 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:26:02 +0300
commit3170c937d95a49572ce01556d3f12dd2adff9a5e (patch)
tree9c9253407e19374ebcf6a65c09152dc4121bf187 /indexer/categories_holder.hpp
parente037d998046da508e7c069f2a61c68c6e7238420 (diff)
[search] Do search for category only if it matches for current, input or English language.
Diffstat (limited to 'indexer/categories_holder.hpp')
-rw-r--r--indexer/categories_holder.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indexer/categories_holder.hpp b/indexer/categories_holder.hpp
index 198716be08..90a5dcf5bc 100644
--- a/indexer/categories_holder.hpp
+++ b/indexer/categories_holder.hpp
@@ -37,7 +37,7 @@ public:
private:
typedef strings::UniString StringT;
typedef multimap<uint32_t, shared_ptr<Category> > Type2CategoryContT;
- typedef multimap<StringT, uint32_t> Name2CatContT;
+ typedef multimap<pair<int8_t, StringT>, uint32_t> Name2CatContT;
typedef Type2CategoryContT::const_iterator IteratorT;
Type2CategoryContT m_type2cat;
@@ -66,11 +66,11 @@ public:
}
template <class ToDo>
- void ForEachTypeByName(StringT const & name, ToDo toDo) const
+ void ForEachTypeByName(int8_t locale, StringT const & name, ToDo toDo) const
{
typedef typename Name2CatContT::const_iterator IterT;
- pair<IterT, IterT> range = m_name2type.equal_range(name);
+ pair<IterT, IterT> range = m_name2type.equal_range(make_pair(locale, name));
while (range.first != range.second)
{
toDo(range.first->second);