fix error

This commit is contained in:
achulkov2 2020-02-26 16:07:18 +03:00
parent 8723b42bcb
commit 960945aa15

View File

@ -59,7 +59,7 @@ std::unique_ptr<ICell> GridRoot::makeCell(Float64 current_min_x, Float64 current
return !bg::intersects(current_box, polygons[id]);
}), possible_ids.end());
if (possible_ids.size() <= kMinIntersections || depth++ == kMaxDepth)
return std::make_unique<FinalCell>(possible_ids);
return std::make_unique<FinalCell>(possible_ids, polygons, current_box);
auto x_shift = (current_max_x - current_min_x) / kSplit;
auto y_shift = (current_max_y - current_min_y) / kSplit;
std::vector<std::unique_ptr<ICell>> children;