diff options
Diffstat (limited to 'indexer/cell_coverer.hpp')
-rw-r--r-- | indexer/cell_coverer.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indexer/cell_coverer.hpp b/indexer/cell_coverer.hpp index c66e3118f1..e7aa35b67b 100644 --- a/indexer/cell_coverer.hpp +++ b/indexer/cell_coverer.hpp @@ -54,6 +54,7 @@ inline void CoverRect(m2::RectD rect, size_t cellsCount, int maxLevel, std::vect cellQueue; cellQueue.push(commonCell); + CHECK_GREATER_OR_EQUAL(maxLevel, 0, ()); while (!cellQueue.empty() && cellQueue.size() + result.size() < cellsCount) { auto id = cellQueue.top(); @@ -123,6 +124,7 @@ void CoverSpiral(m2::RectD rect, int maxLevel, std::vector<CellId> & result) return; CHECK(rect.IsValid(), ()); + CHECK_GREATER_OR_EQUAL(maxLevel, 0, ()); auto centralCell = Converter::ToCellId(rect.Center().x, rect.Center().y); while (maxLevel < centralCell.Level() && centralCell.Level() > 0) centralCell = centralCell.Parent(); |