diff options
author | vng <viktor.govako@gmail.com> | 2011-04-30 07:44:06 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:16:43 +0300 |
commit | 413282b528c74d3b9297be1de0aead482c772405 (patch) | |
tree | 246ddfa1d1671b4967b997319cc32dea5ae70104 /indexer | |
parent | 7b81beed3756b0dd7fc1d299c695e8f135cb36ca (diff) |
Make fixed header size that doesn't depend on mwm bounds rect.
Fix UpdateMWMRectsFromBoundaries.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/data_header.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indexer/data_header.cpp b/indexer/data_header.cpp index 30eb1e73a0..da7efa5768 100644 --- a/indexer/data_header.cpp +++ b/indexer/data_header.cpp @@ -54,8 +54,13 @@ namespace feature void DataHeader::Save(FileWriter & w) const { m_codingParams.Save(w); - WriteVarInt(w, m_bounds.first - m_codingParams.GetBasePointInt64()); - WriteVarInt(w, m_bounds.second - m_codingParams.GetBasePointInt64()); + + //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); + w.Write(m_scales.data(), m_scales.size()); } @@ -63,8 +68,13 @@ namespace feature { ReaderSource<FileReader> src(r); m_codingParams.Load(src); - m_bounds.first = ReadVarInt<int64_t>(src) + m_codingParams.GetBasePointInt64(); - m_bounds.second = ReadVarInt<int64_t>(src) + m_codingParams.GetBasePointInt64(); + + //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); + src.Read(m_scales.data(), m_scales.size()); } } |