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-08 04:41:22 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:25:37 +0300
commit451fb89cc01b16c2c9e5693b07e4b9c72ba234f8 (patch)
treed15ca0e6c53a9543b1ec7d1ca5010219c2a436f3 /indexer/data_header.cpp
parent847712c9fffaf37ff56bae4b447e85144947fe9e (diff)
Minor fixes.
Diffstat (limited to 'indexer/data_header.cpp')
-rw-r--r--indexer/data_header.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/indexer/data_header.cpp b/indexer/data_header.cpp
index f1925173fa..5f8e97c85c 100644
--- a/indexer/data_header.cpp
+++ b/indexer/data_header.cpp
@@ -39,13 +39,21 @@ namespace feature
pair<int, int> DataHeader::GetScaleRange() const
{
- int const worldB = scales::GetUpperWorldScale();
- int const countryB = scales::GetUpperScale();
-
- if (m_scales.back() == countryB)
- return make_pair(worldB + 1, countryB);
- else
- return make_pair(0, worldB);
+ using namespace scales;
+
+ int const low = 0;
+ int const worldH = GetUpperWorldScale();
+ MapType const type = GetType();
+
+ switch (type)
+ {
+ case world: return make_pair(low, worldH);
+ case worldcoasts: return make_pair(low, worldH);
+ default:
+ ASSERT_EQUAL(type, country, ());
+ return make_pair(worldH + 1, GetUpperScale());
+ //return make_pair(low, GetUpperScale());
+ }
}
void DataHeader::Save(FileWriter & w) const