diff --git a/indexer/interval_index.hpp b/indexer/interval_index.hpp index c418208190..d219e6aeaf 100644 --- a/indexer/interval_index.hpp +++ b/indexer/interval_index.hpp @@ -67,14 +67,15 @@ public: --end; // end is inclusive in ForEachImpl(). ForEachNode(f, beg, end, m_Header.m_Levels, 0, m_LevelOffsets[m_Header.m_Levels + 1] - m_LevelOffsets[m_Header.m_Levels], - 0 /* started nodeKey */); + 0 /* started keyBase */); } } private: template void ForEachLeaf(F const & f, uint64_t const beg, uint64_t const end, - uint32_t const offset, uint32_t const size, uint64_t keyBase) const + uint32_t const offset, uint32_t const size, + uint64_t keyBase /* discarded part of object key value in the parent nodes*/) const { buffer_vector data; data.resize_no_init(size); @@ -99,13 +100,14 @@ private: template void ForEachNode(F const & f, uint64_t beg, uint64_t end, int level, - uint32_t offset, uint32_t size, uint64_t nodeKey) const + uint32_t offset, uint32_t size, + uint64_t keyBase /* discarded part of object key value in the parent nodes */) const { offset += m_LevelOffsets[level]; if (level == 0) { - ForEachLeaf(f, beg, end, offset, size, nodeKey); + ForEachLeaf(f, beg, end, offset, size, keyBase); return; } @@ -139,7 +141,7 @@ private: { uint64_t const beg1 = (i == beg0) ? (beg & levelBytesFF) : 0; uint64_t const end1 = (i == end0) ? (end & levelBytesFF) : levelBytesFF; - ForEachNode(f, beg1, end1, level - 1, childOffset, childSize, nodeKey + (uint64_t{i} << skipBits)); + ForEachNode(f, beg1, end1, level - 1, childOffset, childSize, keyBase + (uint64_t{i} << skipBits)); } childOffset += childSize; } @@ -161,7 +163,7 @@ private: { uint64_t const beg1 = (i == beg0) ? (beg & levelBytesFF) : 0; uint64_t const end1 = (i == end0) ? (end & levelBytesFF) : levelBytesFF; - ForEachNode(f, beg1, end1, level - 1, childOffset, childSize, nodeKey + (uint64_t{i} << skipBits)); + ForEachNode(f, beg1, end1, level - 1, childOffset, childSize, keyBase + (uint64_t{i} << skipBits)); } childOffset += childSize; } diff --git a/indexer/locality_index.hpp b/indexer/locality_index.hpp index 69e3843f83..e4252a91f8 100644 --- a/indexer/locality_index.hpp +++ b/indexer/locality_index.hpp @@ -31,7 +31,7 @@ class LocalityIndex { public: using ProcessObject = std::function; - using ProcessClosestObject = std::function; + using ProcessCloseObject = std::function; LocalityIndex() = default; explicit LocalityIndex(Reader const & reader) @@ -63,7 +63,7 @@ public: // thus probably overflowing the |sizeHint| limit. // |processObject| gets object id in the first argument |objectId| and closeness weight // in the seсond argument |closenessWeight| (closeness weight in the range (0.0, 1.0]). - void ForClosestToPoint(ProcessClosestObject const & processObject, m2::PointD const & center, + void ForClosestToPoint(ProcessCloseObject const & processObject, m2::PointD const & center, double radiusM, uint32_t sizeHint) const { auto const rect =