| 70 | } |
| 71 | |
| 72 | std::pair<int, int> DataHeader::GetScaleRange() const |
| 73 | { |
| 74 | using namespace scales; |
| 75 | |
| 76 | int const low = 0; |
| 77 | int const high = GetUpperScale(); |
| 78 | int const worldH = GetUpperWorldScale(); |
| 79 | MapType const type = GetType(); |
| 80 | |
| 81 | switch (type) |
| 82 | { |
| 83 | case MapType::World: return {low, worldH}; |
| 84 | case MapType::WorldCoasts: return {low, high}; |
| 85 | default: |
| 86 | ASSERT_EQUAL(type, MapType::Country, ()); |
| 87 | return {worldH + 1, high}; |
| 88 | |
| 89 | // Uncomment this to test countries drawing in all scales. |
| 90 | // return {1, high}; |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | void DataHeader::Save(FileWriter & w) const |
| 95 | { |
no test coverage detected