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>2013-02-21 23:52:39 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:51:22 +0300
commit9db034bade3b1c5f3e4bd7769f37f48c8c4355dc (patch)
tree518c8b0efa96eb0ebeafbded1c3519c49f2e1486 /indexer/categories_holder.hpp
parentf4a9517f296862ee33899a8a5d3542d50b8075fc (diff)
Store reference to type index instead of raw type in mwm search index.
Diffstat (limited to 'indexer/categories_holder.hpp')
-rw-r--r--indexer/categories_holder.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indexer/categories_holder.hpp b/indexer/categories_holder.hpp
index ab62ca0d21..e756aab61e 100644
--- a/indexer/categories_holder.hpp
+++ b/indexer/categories_holder.hpp
@@ -34,11 +34,12 @@ public:
private:
typedef strings::UniString StringT;
- typedef multimap<uint32_t, shared_ptr<Category> > ContainerT;
- typedef ContainerT::const_iterator IteratorT;
+ typedef multimap<uint32_t, shared_ptr<Category> > Type2CategoryContT;
+ typedef multimap<StringT, uint32_t> Name2CatContT;
+ typedef Type2CategoryContT::const_iterator IteratorT;
- multimap<uint32_t, shared_ptr<Category> > m_type2cat;
- multimap<StringT, uint32_t> m_name2type;
+ Type2CategoryContT m_type2cat;
+ Name2CatContT m_name2type;
public:
CategoriesHolder() {}
@@ -65,7 +66,7 @@ public:
template <class ToDo>
void ForEachTypeByName(StringT const & name, ToDo toDo) const
{
- typedef typename multimap<StringT, uint32_t>::const_iterator IterT;
+ typedef typename Name2CatContT::const_iterator IterT;
pair<IterT, IterT> range = m_name2type.equal_range(name);
while (range.first != range.second)