Skip to content

Commit

Permalink
[indexer] DataHeader: remove 2011 format support.
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana-yan authored and mpimenov committed Dec 15, 2020
1 parent e089abd commit 863ca99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
24 changes: 2 additions & 22 deletions indexer/data_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ namespace feature
ModelReaderPtr headerReader = cont.GetReader(HEADER_FILE_TAG);
version::MwmVersion version;

if (version::ReadVersion(cont, version))
Load(headerReader, version.GetFormat());
else
LoadV1(headerReader);
CHECK(version::ReadVersion(cont, version), ());
Load(headerReader, version.GetFormat());
}

void DataHeader::Load(ModelReaderPtr const & r, version::Format format)
Expand All @@ -140,24 +138,6 @@ namespace feature
// Place all new serializable staff here.
}

void DataHeader::LoadV1(ModelReaderPtr const & r)
{
ReaderSource<ModelReaderPtr> src(r);
int64_t const base = ReadPrimitiveFromSource<int64_t>(src);
m_codingParams = serial::GeometryCodingParams(kPointCoordBits, base);

m_bounds.first = ReadVarInt<int64_t>(src) + base;
m_bounds.second = ReadVarInt<int64_t>(src) + base;

uint32_t const count = 4;
m_scales.resize(count);
src.Read(m_scales.data(), count);

m_type = MapType::Country;

m_format = version::Format::v1;
}

string DebugPrint(DataHeader::MapType type)
{
switch (type)
Expand Down
1 change: 0 additions & 1 deletion indexer/data_header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ namespace feature
/// Use lastFormat as a default value for indexes building.
/// Pass the valid format from mwm in all other cases.
void Load(ModelReaderPtr const & r, version::Format format);
void LoadV1(ModelReaderPtr const & r);

version::Format m_format = version::Format::unknownFormat;
MapType m_type = MapType::World;
Expand Down

0 comments on commit 863ca99

Please sign in to comment.