diff options
author | vng <viktor.govako@gmail.com> | 2011-10-12 16:51:26 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:25:52 +0300 |
commit | c8325d4b968c95ae75f160f7b294903667bd5cd8 (patch) | |
tree | b08a6266a210255681e0211000582b4a8d77101d /indexer/classificator.cpp | |
parent | fcd78ab8b20853699a7edc25581f1faf12cf9516 (diff) |
Calculate coastline type value for once. It's use very often.
Diffstat (limited to 'indexer/classificator.cpp')
-rw-r--r-- | indexer/classificator.cpp | 9 |
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); |