mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
#2805 Use dynamic cast for generalize() due to virtual inheritance of selects
This commit is contained in:
@@ -67,7 +67,7 @@ public:
|
||||
unsigned int size() const { return (unsigned int)ls.size(); }
|
||||
aggregate_of_instance::ptr generalize() {
|
||||
aggregate_of_instance::ptr r(new aggregate_of_instance());
|
||||
for (it i = begin(); i != end(); ++i) r->push(*i);
|
||||
for (it i = begin(); i != end(); ++i) r->push((*i)->as<IfcUtil::IfcBaseClass>());
|
||||
return r;
|
||||
}
|
||||
bool contains(T* t) const { return std::find(ls.begin(), ls.end(), t) != ls.end(); }
|
||||
|
||||
Reference in New Issue
Block a user