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-03-20 17:03:57 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:13:58 +0300
commit9e0c9222a098b26b820ab68bc4bcf63f1faeb327 (patch)
tree2b53736dcf5a040b3222e83405a1484a9af2bde2 /indexer/data_header.cpp
parenta3585d1b990f0e8a1c2ad8ae33376d0ecb719790 (diff)
Add scales to filter mwm files in index.
Diffstat (limited to 'indexer/data_header.cpp')
-rw-r--r--indexer/data_header.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indexer/data_header.cpp b/indexer/data_header.cpp
index 184e7ce5d3..dc5fd28e8e 100644
--- a/indexer/data_header.cpp
+++ b/indexer/data_header.cpp
@@ -1,6 +1,6 @@
#include "data_header.hpp"
-
-#include "../indexer/point_to_int64.hpp"
+#include "point_to_int64.hpp"
+#include "scales.hpp"
#include "../coding/file_reader.hpp"
#include "../coding/file_writer.hpp"
@@ -42,6 +42,20 @@ namespace feature
m_scales[i] = static_cast<uint8_t>(arr[i]);
}
+ pair<int, int> DataHeader::GetScaleRange() const
+ {
+ pair<int, int> ret(0, scales::GetUpperScale());
+
+ int const bound = scales::GetUpperWorldScale();
+
+ if (m_scales.front() > bound)
+ ret.first = bound+1;
+ if (m_scales.back() <= bound)
+ ret.second = bound;
+
+ return ret;
+ }
+
void DataHeader::Save(FileWriter & w) const
{
WriteToSink(w, m_base);