diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h index b6df34136cb..005eb344e3d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h @@ -126,43 +126,21 @@ bool simplify_polygon(PointRange& points, { const std::size_t ini_polygon_size = polygon.size(); - // Start at the last since if two points are identical, the second one gets removed. - // By starting at 'last', we ensure that 'to_remove' is ordered from closest to .begin() - // to closest to .end() - std::size_t last = ini_polygon_size - 1, i = last; - bool stop = false; - std::vector to_remove; - - do + for(std::size_t i=0; i