mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 06:09:16 +00:00
Keep behaviour of returned null pointers for now
This commit is contained in:
@@ -1807,11 +1807,13 @@ IfcEntityList::ptr IfcFile::entitiesByReference(int t) {
|
|||||||
ret = cached_it->second;
|
ret = cached_it->second;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ret.reset(new IfcEntityList);
|
if (it->second.size()) {
|
||||||
ret->reserve((unsigned)it->second.size());
|
ret.reset(new IfcEntityList);
|
||||||
const std::vector<unsigned>& ids = it->second;
|
ret->reserve((unsigned)it->second.size());
|
||||||
for (std::vector<unsigned>::const_iterator jt = ids.begin(); jt != ids.end(); ++jt) {
|
const std::vector<unsigned>& ids = it->second;
|
||||||
ret->push(entityById(*jt));
|
for (std::vector<unsigned>::const_iterator jt = ids.begin(); jt != ids.end(); ++jt) {
|
||||||
|
ret->push(entityById(*jt));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
by_ref_cached_[t] = ret;
|
by_ref_cached_[t] = ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user