diff options
author | vng <viktor.govako@gmail.com> | 2016-12-25 17:38:58 +0300 |
---|---|---|
committer | vng <viktor.govako@gmail.com> | 2016-12-25 17:38:58 +0300 |
commit | 0080acadff1b041a771098d9eb8a6296a63f243c (patch) | |
tree | d01073a27b61cdd6941a05ccf2742d85b70d8b18 /indexer/feature_covering.cpp | |
parent | 4b24b9f7c5190c120233558ae425b3bffb9197df (diff) |
[index] More accurate rect covering in ForEachInRect.
Diffstat (limited to 'indexer/feature_covering.cpp')
-rw-r--r-- | indexer/feature_covering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indexer/feature_covering.cpp b/indexer/feature_covering.cpp index cac448f734..2c468059a0 100644 --- a/indexer/feature_covering.cpp +++ b/indexer/feature_covering.cpp @@ -192,11 +192,10 @@ void AppendLowerLevels(RectId id, int cellDepth, IntervalsT & intervals) void CoverViewportAndAppendLowerLevels(m2::RectD const & r, int cellDepth, IntervalsT & res) { vector<RectId> ids; - CoverRect<MercatorBounds, RectId>(r.minX(), r.minY(), r.maxX(), r.maxY(), 8, cellDepth, ids); + ids.reserve(SPLIT_RECT_CELLS_COUNT); + CoverRect<MercatorBounds, RectId>(r, SPLIT_RECT_CELLS_COUNT, cellDepth, ids); IntervalsT intervals; - intervals.reserve(ids.size() * 4); - for (size_t i = 0; i < ids.size(); ++i) AppendLowerLevels(ids[i], cellDepth, intervals); |