diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index b70808fc77..1ed8ee1627 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -1275,8 +1275,7 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn } const IfcSchema::IfcRepresentationItem* IfcGeom::Kernel::find_item_carrying_style(const IfcSchema::IfcRepresentationItem* item) { - IfcSchema::IfcStyledItem::list::ptr styles = item->StyledByItem(); - if (styles->size()) { + if (item->StyledByItem()->size()) { return item; } @@ -1284,9 +1283,7 @@ const IfcSchema::IfcRepresentationItem* IfcGeom::Kernel::find_item_carrying_styl // All instantiations of IfcBooleanOperand (type of FirstOperand) are subtypes of // IfcGeometricRepresentationItem item = (IfcSchema::IfcGeometricRepresentationItem*) ((IfcSchema::IfcBooleanClippingResult*) item)->FirstOperand(); - - IfcSchema::IfcStyledItem::list::ptr styles = item->StyledByItem(); - if (styles->size()) { + if (item->StyledByItem()->size()) { return item; } } @@ -1297,4 +1294,4 @@ const IfcSchema::IfcRepresentationItem* IfcGeom::Kernel::find_item_carrying_styl // distinctly styled union operands. return item; -} \ No newline at end of file +}