diff options
author | vng <viktor.govako@gmail.com> | 2011-09-22 17:56:28 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:24:13 +0300 |
commit | 85a3771dbfcc3fe8193ccaa88f6eead7f99b4de6 (patch) | |
tree | 656aa1cabb9e34087b4272c7c35c9225184291d3 /indexer/index.cpp | |
parent | c5dbcf62dbaffb8f45b26e79a2d31e0ed04eeea1 (diff) |
Fix index initialization (FilesContainerR).
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r-- | indexer/index.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp index 8c4bdb26e2..48f91e3b23 100644 --- a/indexer/index.cpp +++ b/indexer/index.cpp @@ -5,10 +5,10 @@ namespace { -FilesContainerR * CreateFileContainer(string const & fileName) -{ - return new FilesContainerR(fileName); -} + FilesContainerR * CreateFileContainer(string const & fileName) + { + return new FilesContainerR(GetPlatform().GetReader(fileName)); + } } // unnamed namespace Index::Index() : MwmSet(bind(&Index::FillInMwmInfo, this, _1, _2), &CreateFileContainer) @@ -19,8 +19,11 @@ void Index::FillInMwmInfo(string const & fileName, MwmInfo & info) { IndexFactory factory; factory.Load(FilesContainerR(GetPlatform().GetReader(fileName))); + feature::DataHeader const & h = factory.GetHeader(); info.m_limitRect = h.GetBounds(); - info.m_minScale = static_cast<uint8_t>(h.GetScaleRange().first); - info.m_maxScale = static_cast<uint8_t>(h.GetScaleRange().second); + + pair<int, int> const scaleR = h.GetScaleRange(); + info.m_minScale = static_cast<uint8_t>(scaleR.first); + info.m_maxScale = static_cast<uint8_t>(scaleR.second); } |