diff options
author | Yuri Gorshenin <y@maps.me> | 2015-09-07 16:09:01 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:02:14 +0300 |
commit | 0d8c0de484edb86b8cb8217b32f55fb85f6321c7 (patch) | |
tree | 19aca6927bb355a302b7345c1413bd9950d9ced1 /indexer/index.cpp | |
parent | 00001c40c29c86975c798e54f7b133f542b7d29f (diff) |
Removed references to TrieValue::m_rank.
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r-- | indexer/index.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp index ecda41c2c7..901db047bc 100644 --- a/indexer/index.cpp +++ b/indexer/index.cpp @@ -2,6 +2,8 @@ #include "platform/local_country_file_utils.hpp" +#include "indexer/rank_table.hpp" + #include "coding/file_name_utils.hpp" #include "coding/internal/file_data.hpp" @@ -63,7 +65,18 @@ unique_ptr<MwmInfo> Index::CreateInfo(platform::LocalCountryFile const & localFi unique_ptr<MwmSet::MwmValueBase> Index::CreateValue(MwmInfo & info) const { - unique_ptr<MwmValue> p(new MwmValue(info.GetLocalFile())); + // Create a section with rank table if it does not exist. + platform::LocalCountryFile const & localFile = info.GetLocalFile(); + try + { + search::RankTableBuilder::CreateIfNotExists(localFile); + } + catch (Reader::OpenException const & e) + { + LOG(LWARNING, ("Can't create rank table for:", localFile, ":", e.Msg())); + } + + unique_ptr<MwmValue> p(new MwmValue(localFile)); p->SetTable(dynamic_cast<MwmInfoEx &>(info)); ASSERT(p->GetHeader().IsMWMSuitable(), ()); return unique_ptr<MwmSet::MwmValueBase>(move(p)); |