Fix some casting logic

This commit is contained in:
Thomas Krijnen
2021-09-13 13:19:56 +02:00
parent 99a27fbfef
commit 1058dc7099
14 changed files with 2806 additions and 2807 deletions
+2 -2
View File
@@ -3445,8 +3445,8 @@ const IfcSchema::IfcRepresentationItem* IfcGeom::Kernel::find_item_carrying_styl
while (item->declaration().is(IfcSchema::IfcBooleanResult::Class())) {
// All instantiations of IfcBooleanOperand (type of FirstOperand) are subtypes of
// IfcGeometricRepresentationItem
item = (IfcSchema::IfcGeometricRepresentationItem*) ((IfcSchema::IfcBooleanResult*) item)->FirstOperand();
if (item->StyledByItem()->size()) {
item = item->as<IfcSchema::IfcBooleanResult>()->FirstOperand()->as<IfcSchema::IfcRepresentationItem>();
if (item && item->StyledByItem()->size()) {
return item;
}
}