diff options
-rw-r--r-- | indexer/data_header.cpp | 22 |
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 |