mapping binding - never overwrite already set item->instance

1) this way code should be more straightforward
2) this allows us not to reimplement mapping.get_surface_style logic in IfcGeomWrapper as it will be already handled in map_impl(const IfcSchema::IfcStyledItem* inst) and the resulting item->instance is not overridden by IfcStyledItem.
This commit is contained in:
Andrej730
2024-06-21 14:44:25 +05:00
committed by Andrej
parent 301cdf6504
commit 68d3539a86
2 changed files with 1 additions and 20 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
try { \
item = map_impl(inst->as<IfcSchema::T>()); \
if (item != nullptr) { \
if (!(item->instance && inst->as<IfcSchema::IfcMaterial>())) { \
if (item->instance == nullptr) { \
item->instance = inst; \
} \
try { \