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-09-07 21:42:07 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:23:18 +0300
commit88203cfbd15db6992be3c6a5c8a7755377748ebf (patch)
tree44c0f8e30f197672a5418fea6bf24377ccea5f51 /indexer/data_header.cpp
parent883a8fe414cc75d77660759244e44a81a27b0ee2 (diff)
Add type of map (country, world, world coasts) to mwm header.
Diffstat (limited to 'indexer/data_header.cpp')
-rw-r--r--indexer/data_header.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/indexer/data_header.cpp b/indexer/data_header.cpp
index 0c193981d2..5b1c822e32 100644
--- a/indexer/data_header.cpp
+++ b/indexer/data_header.cpp
@@ -46,13 +46,12 @@ namespace feature
{
m_codingParams.Save(w);
- //int64_t const base = m_codingParams.GetBasePointInt64();
- //WriteVarInt(w, m_bounds.first - base);
- //WriteVarInt(w, m_bounds.second - base);
- WriteToSink(w, m_bounds.first);
- WriteToSink(w, m_bounds.second);
+ WriteVarInt(w, m_bounds.first);
+ WriteVarInt(w, m_bounds.second);
w.Write(m_scales.data(), m_scales.size());
+
+ WriteVarInt(w, static_cast<int32_t>(m_type));
}
void DataHeader::Load(ModelReaderPtr const & r)
@@ -60,14 +59,13 @@ namespace feature
ReaderSource<ModelReaderPtr> src(r);
m_codingParams.Load(src);
- //int64_t const base = m_codingParams.GetBasePointInt64();
- //m_bounds.first = ReadVarInt<int64_t>(src) + base;
- //m_bounds.second = ReadVarInt<int64_t>(src) + base;
- m_bounds.first = ReadPrimitiveFromSource<int64_t>(src);
- m_bounds.second = ReadPrimitiveFromSource<int64_t>(src);
+ m_bounds.first = ReadVarInt<int64_t>(src);
+ m_bounds.second = ReadVarInt<int64_t>(src);
src.Read(m_scales.data(), m_scales.size());
+ m_type = static_cast<MapType>(ReadVarInt<int32_t>(src));
+
m_ver = v2;
}