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>2011-11-25 17:36:28 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:28:55 +0300
commit34e4fdeeef46b33abf61a41fce064a9d8dc22e16 (patch)
tree40972a8ae002194a363140212d39c83ccc288a1e /indexer/classificator.hpp
parent278bc7b91df20cdf038bd21e03d1fd16e631f6fd (diff)
Fix type to index mapping. Load file once.
Diffstat (limited to 'indexer/classificator.hpp')
-rw-r--r--indexer/classificator.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indexer/classificator.hpp b/indexer/classificator.hpp
index cc0249215f..2453b7fd74 100644
--- a/indexer/classificator.hpp
+++ b/indexer/classificator.hpp
@@ -203,8 +203,7 @@ class Classificator
{
ClassifObject m_root;
- Index2Type m_i2t;
- Type2Index m_t2i;
+ IndexAndTypeMapping m_mapping;
uint32_t m_coastType;
@@ -234,8 +233,8 @@ public:
/// path = ["natural", "caostline"].
uint32_t GetTypeByPath(vector<string> const & path) const;
- uint32_t GetIndexForType(uint32_t t) const { return m_t2i.GetIndex(t); }
- uint32_t GetTypeForIndex(uint32_t i) const { return m_i2t.GetType(i); }
+ uint32_t GetIndexForType(uint32_t t) const { return m_mapping.GetIndex(t); }
+ uint32_t GetTypeForIndex(uint32_t i) const { return m_mapping.GetType(i); }
inline uint32_t GetCoastType() const { return m_coastType; }