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>2015-10-09 18:46:57 +0300
committervng <viktor.govako@gmail.com>2015-10-12 12:36:38 +0300
commit93fb8cdc33a6a515c4de798f773680db1562a05d (patch)
treec3acb62800885690efe760492b385fd93eb0fce2 /indexer/index.cpp
parentf4082a8ef7f6a7057f66afb7369101bc59937cd7 (diff)
[mwm] Put feature offsets table into MWM container.
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r--indexer/index.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp
index 1592715dff..cafe3c4213 100644
--- a/indexer/index.cpp
+++ b/indexer/index.cpp
@@ -24,11 +24,17 @@ MwmValue::MwmValue(LocalCountryFile const & localFile)
void MwmValue::SetTable(MwmInfoEx & info)
{
- if (GetHeader().GetFormat() < version::v5)
+ auto const ver = GetHeader().GetFormat();
+ if (ver < version::v5)
return;
if (!info.m_table)
- info.m_table = feature::FeaturesOffsetsTable::CreateIfNotExistsAndLoad(m_file, m_cont);
+ {
+ if (ver == version::v5)
+ info.m_table = feature::FeaturesOffsetsTable::CreateIfNotExistsAndLoad(m_file, m_cont);
+ else
+ info.m_table = feature::FeaturesOffsetsTable::Load(m_cont);
+ }
m_table = info.m_table.get();
}