mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
Fix IfcFile::getInverse<T>()
This commit is contained in:
@@ -265,14 +265,7 @@ public:
|
||||
|
||||
template <class T>
|
||||
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<T>();
|
||||
}
|
||||
|
||||
unsigned int FreshId() { return ++MaxId; }
|
||||
|
||||
Reference in New Issue
Block a user