whitespace

This commit is contained in:
Thomas Krijnen
2021-09-05 09:32:39 +02:00
parent 6cc842a2ac
commit f898893607
+12 -12
View File
@@ -2206,23 +2206,23 @@ IfcEntityList::ptr IfcFile::getInverse(int instance_id, const IfcParse::declarat
IfcEntityList::ptr all = instances_by_reference(instance_id); IfcEntityList::ptr all = instances_by_reference(instance_id);
if (!all) return l; if (!all) return l;
for(IfcEntityList::it it = all->begin(); it != all->end(); ++it) { for (IfcEntityList::it it = all->begin(); it != all->end(); ++it) {
bool valid = type == 0 || (*it)->declaration().is(*type); bool valid = type == 0 || (*it)->declaration().is(*type);
if (valid && attribute_index >= 0) { if (valid && attribute_index >= 0) {
try { try {
Argument* arg = (*it)->data().getArgument(attribute_index); Argument* arg = (*it)->data().getArgument(attribute_index);
if (arg->isNull()) { if (arg->isNull()) {
valid = false; valid = false;
} else if (arg->type() == IfcUtil::Argument_ENTITY_INSTANCE) { } else if (arg->type() == IfcUtil::Argument_ENTITY_INSTANCE) {
valid = instance == *arg; valid = instance == *arg;
} else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE) { } else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE) {
IfcEntityList::ptr li = *arg; IfcEntityList::ptr li = *arg;
valid = li->contains(instance); valid = li->contains(instance);
} else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE) { } else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE) {
IfcEntityListList::ptr li = *arg; IfcEntityListList::ptr li = *arg;
valid = li->contains(instance); valid = li->contains(instance);
} }
} catch (const IfcException& e) { } catch (const IfcException& e) {
valid = false; valid = false;
Logger::Error(e); Logger::Error(e);
} }