diff --git a/src/ifcgeom/AbstractKernel.h b/src/ifcgeom/AbstractKernel.h index ed4985c056..c78794c862 100644 --- a/src/ifcgeom/AbstractKernel.h +++ b/src/ifcgeom/AbstractKernel.h @@ -111,7 +111,7 @@ namespace { /* A compile-time for loop over the taxonomy kinds */ template struct dispatch_conversion { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* kernel, ifcopenshell::geometry::taxonomy::kinds item_kind, const ifcopenshell::geometry::taxonomy::ptr item, IfcGeom::ConversionResults& results) { + static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* kernel, ifcopenshell::geometry::taxonomy::kinds item_kind, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults& results) { if (N == item_kind) { auto concrete_item = std::static_pointer_cast>(item); return kernel->convert_impl(concrete_item, results); @@ -123,7 +123,7 @@ namespace { template <> struct dispatch_conversion { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel*, ifcopenshell::geometry::taxonomy::kinds, const ifcopenshell::geometry::taxonomy::ptr item, IfcGeom::ConversionResults&) { + static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel*, ifcopenshell::geometry::taxonomy::kinds, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { Logger::Error("No conversion for " + std::to_string(item->kind())); return false; } @@ -131,7 +131,7 @@ namespace { template struct dispatch_with_upgrade { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* kernel, const ifcopenshell::geometry::taxonomy::ptr item, IfcGeom::ConversionResults& results) { + static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* kernel, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults& results) { auto concrete_item = ifcopenshell::geometry::taxonomy::template dcast>(item); if (concrete_item) { return kernel->convert_impl(concrete_item, results); @@ -143,7 +143,7 @@ namespace { template <> struct dispatch_with_upgrade { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel*, const ifcopenshell::geometry::taxonomy::ptr item, IfcGeom::ConversionResults&) { + static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel*, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { Logger::Error("No conversion with upgrade for " + std::to_string(item->kind())); return false; } @@ -165,7 +165,7 @@ namespace { /* A compile-time for loop over the curve kinds */ template struct dispatch_curve_creation { - static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr item, T& visitor) { + static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr& item, T& visitor) { constexpr auto KindIndex = TupleTypeIndex, ifcopenshell::geometry::taxonomy::impl::KindsTuple>::value; if (item->kind() == KindIndex) { auto concrete_item = std::static_pointer_cast>(item); @@ -179,7 +179,7 @@ namespace { template struct dispatch_curve_creation { - static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr item, T&) { + static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr& item, T&) { Logger::Error("No conversion for " + std::to_string(item->kind())); return false; } @@ -188,7 +188,7 @@ namespace { /* A compile-time for loop over the curve kinds */ template struct dispatch_surface_creation { - static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr item, T& visitor) { + static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr& item, T& visitor) { auto v = ifcopenshell::geometry::taxonomy::template dcast>(item); if (v && item->kind() == v->kind()) { visitor(v); @@ -201,7 +201,7 @@ namespace { template struct dispatch_surface_creation { - static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr item, T&) { + static bool dispatch(const ifcopenshell::geometry::taxonomy::ptr& item, T&) { Logger::Error("No conversion for " + std::to_string(item->kind())); return false; }