From aa3ccf5cb51d709c1f3cdfafe870e6b1ba93fb6c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 20 Sep 2020 12:19:43 +0200 Subject: [PATCH] const lvalue things --- src/ifcgeom/kernels/cgal/CgalKernel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;