From 6a7e89d3aa9f6bc4209d472217ce1d0c0e71279f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 28 Jan 2020 14:43:29 +0100 Subject: [PATCH] use make_range() --- .../include/CGAL/Polygon_mesh_processing/distance.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 367b82a94e3..25cc7189ba3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -289,10 +289,8 @@ struct Triangle_structure_sampler_base nb_pts_a_u = 2. / CGAL::square(min_edge_length); } - for(TriangleIterator it = static_cast(this)->get_range().first; - it != static_cast(this)->get_range().second; ++it) + for(const auto& tr: make_range(static_cast(this)->get_range())) { - auto tr = *it; std::size_t nb_points = nb_points_per_face; if (nb_points == 0) {