From f2ad1b25bcda9c977225c743737f159060a8ff6e Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Tue, 12 Nov 2024 09:34:36 +0100 Subject: [PATCH] Pass mesh by reference instead of copy --- .../include/CGAL/Surface_mesh_deformation.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h index a536e13ddaed..7b36a1ce4860 100644 --- a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h +++ b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h @@ -90,10 +90,10 @@ struct Types_selectors struct ARAP_visitor { - void init(TriangleMesh, VertexPointMap){} + void init(const TriangleMesh&, VertexPointMap){} void rotation_matrix_pre(typename boost::graph_traits::vertex_descriptor, - TriangleMesh&){} + const TriangleMesh&){} template void update_covariance_matrix(Square_matrix_3&, @@ -125,7 +125,7 @@ struct Types_selectors public: ARAP_visitor(): m_alpha(0.02) {} - void init(TriangleMesh triangle_mesh, const VertexPointMap& vpmap) + void init(const TriangleMesh &triangle_mesh, const VertexPointMap& vpmap) { // calculate area m_area = 0; @@ -143,7 +143,7 @@ struct Types_selectors void rotation_matrix_pre( typename boost::graph_traits::vertex_descriptor vi, - TriangleMesh& hg) + const TriangleMesh& hg) { typename boost::graph_traits::in_edge_iterator e, e_end; std::tie(e,e_end) = in_edges(vi, hg);