Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions path_finding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class PathFindingSurface {
return;
}
if (keep_in) {
multi_polygon_type_fp total_keep_in;
total_keep_in = *keep_in;
total_keep_in = total_keep_in - keep_out;
multi_polygon_type_fp total_keep_in = *keep_in - keep_out;

for (const auto& poly : total_keep_in) {
for (const auto& point : poly.outer()) {
Expand Down Expand Up @@ -63,16 +61,10 @@ class PathFindingSurface {
}

sort(all_vertices.begin(),
all_vertices.end(),
[](const point_type_fp& a, const point_type_fp& b) {
return std::tie(a.x(), a.y()) < std::tie(b.x(), b.y());
});
all_vertices.end());
all_vertices.erase(
std::unique(all_vertices.begin(),
all_vertices.end(),
[](const point_type_fp& a, const point_type_fp& b) {
return std::tie(a.x(), a.y()) == std::tie(b.x(), b.y());
}),
all_vertices.end()),
all_vertices.end());
for (const auto& v : all_vertices) {
bg::expand(all_vertices_box, v);
Expand Down