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-10-12 16:51:26 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:25:52 +0300
commitc8325d4b968c95ae75f160f7b294903667bd5cd8 (patch)
treeb08a6266a210255681e0211000582b4a8d77101d /indexer/classificator.cpp
parentfcd78ab8b20853699a7edc25581f1faf12cf9516 (diff)
Calculate coastline type value for once. It's use very often.
Diffstat (limited to 'indexer/classificator.cpp')
-rw-r--r--indexer/classificator.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp
index d3b91fe2b1..17169eb220 100644
--- a/indexer/classificator.cpp
+++ b/indexer/classificator.cpp
@@ -438,6 +438,9 @@ void Classificator::ReadClassificator(string const & buffer)
tree::LoadTreeAsText(iss, policy);
m_root.Sort();
+
+ char const * path[] = { "natural", "coastline" };
+ m_coastType = GetTypeByPath(vector<string>(path, path + 2));
}
void Classificator::PrintClassificator(char const * fPath)
@@ -500,12 +503,6 @@ uint32_t Classificator::GetTypeByPath(vector<string> const & path) const
return type;
}
-uint32_t Classificator::GetCoastType() const
-{
- char const * path[] = { "natural", "coastline" };
- return GetTypeByPath(vector<string>(path, path + 2));
-}
-
void Classificator::ReadTypesMapping(string const & buffer)
{
m_i2t.Load(buffer);