From 7652144184b569d1b9a31a269a7aba87cec20b9c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 1 Jun 2023 21:39:08 +0200 Subject: [PATCH] Fix IfcFile::getInverse() --- src/ifcparse/IfcFile.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ifcparse/IfcFile.h b/src/ifcparse/IfcFile.h index 90d6ef4073..87ad601c36 100644 --- a/src/ifcparse/IfcFile.h +++ b/src/ifcparse/IfcFile.h @@ -265,14 +265,7 @@ public: template typename T::list::ptr getInverse(int instance_id, int attribute_index) { - aggregate_of_instance::ptr return_value(new aggregate_of_instance); - auto it = byref.find({ instance_id, T::Class().index_in_schema(), attribute_index }); - if (it != byref.end()) { - for (auto& i : it->second) { - return_value->push((T*)instance_by_id(i)); - } - } - return return_value; + return getInverse(instance_id, &T::Class(), attribute_index)->as(); } unsigned int FreshId() { return ++MaxId; }