From bf956dfbe328047299da2417078c8fb9d755e5e0 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sun, 18 Aug 2024 05:34:15 +0200 Subject: [PATCH] Fix build with CGAL 5.6 (again) (#6439) * Fix build with CGAL 5.6 Surface_mesh iterators no longer return references, so it's necessary to use const references or copies when iterating. This was previously merged in #3045 but isn't references in the current main branch anymore. No idea where why it is gone, but the issue still persists thus the patch should still be added. --- src/libslic3r/MeshBoolean.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/MeshBoolean.cpp b/src/libslic3r/MeshBoolean.cpp index c412553a22..779d5a042b 100644 --- a/src/libslic3r/MeshBoolean.cpp +++ b/src/libslic3r/MeshBoolean.cpp @@ -201,12 +201,12 @@ indexed_triangle_set cgal_to_indexed_triangle_set(const _Mesh &cgalmesh) const auto &vertices = cgalmesh.vertices(); int vsize = int(vertices.size()); - for (auto &vi : vertices) { + for (const auto &vi : vertices) { auto &v = cgalmesh.point(vi); // Don't ask... its.vertices.emplace_back(to_vec3f(v)); } - for (auto &face : faces) { + for (const auto &face : faces) { auto vtc = cgalmesh.vertices_around_face(cgalmesh.halfedge(face)); int i = 0;