Skip to content

Commit

Permalink
Handle duplicates in IRM::unincorporate.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyfertig committed Sep 21, 2024
1 parent b12a4af commit 8c58d7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cxx/irm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ void IRM::unincorporate(const std::string& r, const T_items& items) {
for (size_t i = 0; i < rel_domains.size(); ++i) {
if (!irm_contains_item.at({rel_domains[i], items[i]})) {
domains[rel_domains[i]]->unincorporate(items[i]);

// Only unincorporate duplicates once.
irm_contains_item[{rel_domains[i], items[i]}] = true;
}
}
}
Expand Down

0 comments on commit 8c58d7e

Please sign in to comment.