diff options
author | vng <viktor.govako@gmail.com> | 2011-10-16 15:36:08 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:26:06 +0300 |
commit | c99c4df6bc11f76d37d51d75c96653143eaaa738 (patch) | |
tree | 97b555510688f380fbe045e4b632cbec9f72b578 /indexer/old | |
parent | b5f74708130267036f4097f098eada2902957548 (diff) |
Fix bug in geometry offsets loading after my changes with dynamic scales.
Diffstat (limited to 'indexer/old')
-rw-r--r-- | indexer/old/feature_loader_101.cpp | 21 | ||||
-rw-r--r-- | indexer/old/feature_loader_101.hpp | 2 |
2 files changed, 2 insertions, 21 deletions
diff --git a/indexer/old/feature_loader_101.cpp b/indexer/old/feature_loader_101.cpp index 4068683e7d..7fd8807582 100644 --- a/indexer/old/feature_loader_101.cpp +++ b/indexer/old/feature_loader_101.cpp @@ -118,11 +118,6 @@ void LoaderImpl::ParseCommon() m_Header2Offset = CalcOffset(source); } -namespace -{ - uint32_t const kInvalidOffset = uint32_t(-1); -} - int LoaderImpl::GetScaleIndex(int scale) const { int const count = m_Info.GetScalesCount(); @@ -140,7 +135,7 @@ int LoaderImpl::GetScaleIndex(int scale, offsets_t const & offsets) const { // Choose the best geometry for the last visible scale. int i = offsets.size()-1; - while (i >= 0 && offsets[i] == kInvalidOffset) --i; + while (i >= 0 && offsets[i] == s_InvalidOffset) --i; if (i >= 0) return i; else @@ -151,7 +146,7 @@ int LoaderImpl::GetScaleIndex(int scale, offsets_t const & offsets) const for (size_t i = 0; i < m_Info.GetScalesCount(); ++i) if (scale <= m_Info.GetScale(i)) { - if (offsets[i] != kInvalidOffset) + if (offsets[i] != s_InvalidOffset) return i; else break; @@ -357,17 +352,5 @@ uint32_t LoaderImpl::ParseTriangles(int scale) return sz; } -void LoaderImpl::ReadOffsets(ArrayByteSource & src, uint8_t mask, offsets_t & offsets) const -{ - ASSERT ( offsets.empty(), () ); - ASSERT_GREATER ( mask, 0, () ); - - while (mask > 0) - { - offsets.push_back((mask & 0x01) ? ReadVarUint<uint32_t>(src) : kInvalidOffset); - mask = mask >> 1; - } -} - } } diff --git a/indexer/old/feature_loader_101.hpp b/indexer/old/feature_loader_101.hpp index 6b439d4a0e..2d4742daab 100644 --- a/indexer/old/feature_loader_101.hpp +++ b/indexer/old/feature_loader_101.hpp @@ -8,8 +8,6 @@ namespace old_101 { namespace feature { typedef ::feature::LoaderBase BaseT; - void ReadOffsets(ArrayByteSource & src, uint8_t mask, offsets_t & offsets) const; - /// Get the index for geometry serialization. /// @param[in] scale: /// -1 : index for the best geometry |