From 325009bc4845d26b89bb4d2bd500aca5c528287e Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Sat, 9 Dec 2023 01:14:20 -0800 Subject: [PATCH] Fix build error with CGAL 5.6 with -std=gnu++17 on Fedora (#3045) 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. --- 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 50bbc099e8..b05245d396 100644 --- a/src/libslic3r/MeshBoolean.cpp +++ b/src/libslic3r/MeshBoolean.cpp @@ -200,12 +200,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;