diff --git a/generator/mwm_rect_updater.cpp b/generator/mwm_rect_updater.cpp index b36c2420b6..d32e396179 100644 --- a/generator/mwm_rect_updater.cpp +++ b/generator/mwm_rect_updater.cpp @@ -35,7 +35,7 @@ namespace { FilesContainerW contW(name, FileWriter::OP_WRITE_EXISTING); - FileWriter w = contW.GetWriter(HEADER_FILE_TAG); + FileWriter w = contW.GetExistingWriter(HEADER_FILE_TAG); h.Save(w); } } 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 src(r); m_codingParams.Load(src); - m_bounds.first = ReadVarInt(src) + m_codingParams.GetBasePointInt64(); - m_bounds.second = ReadVarInt(src) + m_codingParams.GetBasePointInt64(); + + //int64_t const base = m_codingParams.GetBasePointInt64(); + //m_bounds.first = ReadVarInt(src) + base; + //m_bounds.second = ReadVarInt(src) + base; + m_bounds.first = ReadPrimitiveFromSource(src); + m_bounds.second = ReadPrimitiveFromSource(src); + src.Read(m_scales.data(), m_scales.size()); } }