Skip to content

Commit 1c2587b

Browse files
committed
Fix for inverse update on delete
1 parent 5359e88 commit 1c2587b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ifcparse/IfcParse.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,8 @@ void IfcFile::removeEntity(IfcUtil::IfcBaseClass* entity) {
17321732
entities_by_ref_t::iterator byref_it = byref.find(name);
17331733
if (byref_it != byref.end()) {
17341734
std::vector<unsigned>& ids = byref_it->second;
1735-
std::remove(ids.begin(), ids.end(), name);
1735+
std::vector<unsigned>::const_iterator removed_from = std::remove(ids.begin(), ids.end(), id);
1736+
ids.erase(removed_from, ids.end());
17361737
}
17371738
}
17381739
}

0 commit comments

Comments
 (0)