diff --git a/src/ifcgeom/kernels/cgal/CgalKernel.cpp b/src/ifcgeom/kernels/cgal/CgalKernel.cpp index e178c6d5ec..ca3aba9997 100644 --- a/src/ifcgeom/kernels/cgal/CgalKernel.cpp +++ b/src/ifcgeom/kernels/cgal/CgalKernel.cpp @@ -139,7 +139,7 @@ CGAL::Nef_polyhedron_3 ifcopenshell::geometry::utils::create_nef_polyhe namespace { template - void visit(const taxonomy::collection* c, Fn& fn) { + void visit(const taxonomy::collection* c, const Fn& fn) { static_assert(std::is_same::value, "@todo Only implemented for point3"); for (auto& i : c->children) { if (dynamic_cast(i)) { @@ -1286,7 +1286,7 @@ namespace { distances = { +inf, -inf }; - for (auto& e : edges(shape)) { + for (const auto& e : edges(shape)) { const auto& p0 = e.halfedge()->vertex()->point(); const auto& p1 = e.halfedge()->next()->vertex()->point(); auto p01 = p1 - p0;