From 4d7ff493a864633f7c0fb832337de3e6a5463276 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 22 Aug 2021 21:11:55 +1000 Subject: [PATCH] Minor iterator optimisation to prevent inverse check for associated materials --- src/ifcgeom/IfcGeomIteratorImplementation.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ifcgeom/IfcGeomIteratorImplementation.h b/src/ifcgeom/IfcGeomIteratorImplementation.h index 99010b218f..204dfd45f1 100644 --- a/src/ifcgeom/IfcGeomIteratorImplementation.h +++ b/src/ifcgeom/IfcGeomIteratorImplementation.h @@ -604,6 +604,10 @@ namespace IfcGeom { return false; } + if (products->size() == 1) { + return true; + } + std::set associated_single_materials; for (IfcSchema::IfcProduct::list::it it = products->begin(); it != products->end(); ++it) {