mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Add a cast in templated list conversion
This commit is contained in:
@@ -130,7 +130,7 @@ public:
|
|||||||
typename U::list::ptr as() {
|
typename U::list::ptr as() {
|
||||||
typename U::list::ptr r(new typename U::list);
|
typename U::list::ptr r(new typename U::list);
|
||||||
const bool all = U::Class() == IfcSchema::Type::ALL;
|
const bool all = U::Class() == IfcSchema::Type::ALL;
|
||||||
for ( it i = begin(); i != end(); ++ i ) if (all || (*i)->is(U::Class())) r->push(*i);
|
for ( it i = begin(); i != end(); ++ i ) if (all || (*i)->is(U::Class())) r->push((U*)*i);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user