mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
const lvalue things
This commit is contained in:
@@ -139,7 +139,7 @@ CGAL::Nef_polyhedron_3<Kernel_> ifcopenshell::geometry::utils::create_nef_polyhe
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
template <typename T, typename Fn>
|
template <typename T, typename Fn>
|
||||||
void visit(const taxonomy::collection* c, Fn& fn) {
|
void visit(const taxonomy::collection* c, const Fn& fn) {
|
||||||
static_assert(std::is_same<T, taxonomy::point3>::value, "@todo Only implemented for point3");
|
static_assert(std::is_same<T, taxonomy::point3>::value, "@todo Only implemented for point3");
|
||||||
for (auto& i : c->children) {
|
for (auto& i : c->children) {
|
||||||
if (dynamic_cast<const taxonomy::collection*>(i)) {
|
if (dynamic_cast<const taxonomy::collection*>(i)) {
|
||||||
@@ -1286,7 +1286,7 @@ namespace {
|
|||||||
|
|
||||||
distances = { +inf, -inf };
|
distances = { +inf, -inf };
|
||||||
|
|
||||||
for (auto& e : edges(shape)) {
|
for (const auto& e : edges(shape)) {
|
||||||
const auto& p0 = e.halfedge()->vertex()->point();
|
const auto& p0 = e.halfedge()->vertex()->point();
|
||||||
const auto& p1 = e.halfedge()->next()->vertex()->point();
|
const auto& p1 = e.halfedge()->next()->vertex()->point();
|
||||||
auto p01 = p1 - p0;
|
auto p01 = p1 - p0;
|
||||||
|
|||||||
Reference in New Issue
Block a user