diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h index 25d88759ba5..0d03c4b0cd2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h @@ -307,7 +307,7 @@ void run_stitch_borders(PM& pmesh, CGAL_USE(vpm); std::vector vertices_to_delete; - for(const halfedges_pair hk : to_stitch) + for(const halfedges_pair& hk : to_stitch) { halfedge_descriptor h1 = hk.first; halfedge_descriptor h2 = hk.second; @@ -367,7 +367,7 @@ void run_stitch_borders(PM& pmesh, /// In order to avoid having to maintain a set with halfedges to stitch /// we do on purpose next-prev linking that might not be useful but that /// is harmless and still less expensive than doing queries in a set - for(const halfedges_pair hk : to_stitch) + for(const halfedges_pair& hk : to_stitch) { halfedge_descriptor h1 = hk.first; halfedge_descriptor h2 = hk.second; @@ -385,7 +385,7 @@ void run_stitch_borders(PM& pmesh, /// update HDS connectivity, removing the second halfedge /// of each the pair and its opposite - for(const halfedges_pair hk : to_stitch) + for(const halfedges_pair& hk : to_stitch) { halfedge_descriptor h1 = hk.first; halfedge_descriptor h2 = hk.second; @@ -446,7 +446,7 @@ std::size_t stitch_borders_impl(PM& pmesh, typedef boost::unordered_map Uf_handles; Uf_handles uf_handles; - for(const halfedges_pair hk : to_stitch) + for(const halfedges_pair& hk : to_stitch) { halfedge_descriptor h1 = hk.first; halfedge_descriptor h2 = hk.second; @@ -530,7 +530,7 @@ std::size_t stitch_borders_impl(PM& pmesh, { std::vector to_stitch_filtered; to_stitch_filtered.reserve( to_stitch.size()); - for(const halfedges_pair hk : to_stitch) + for(const halfedges_pair& hk : to_stitch) { // We test both halfedges because the previous test // might involve only one of the two halfedges @@ -546,7 +546,7 @@ std::size_t stitch_borders_impl(PM& pmesh, // redo union find as some "master" vertex might be unstitchable uf_vertices.clear(); uf_handles.clear(); - for(const halfedges_pair hk : to_stitch_filtered) + for(const halfedges_pair& hk : to_stitch_filtered) { halfedge_descriptor h1 = hk.first; halfedge_descriptor h2 = hk.second;