Skip to content

Commit

Permalink
hash_storage: compare values in equality operator (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
opera-aberglund authored Apr 21, 2024
1 parent 715692f commit e5602b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/cista/containers/hash_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ struct hash_storage {
return false;
}
for (auto const& el : *this) {
if (b.find(GetKey()(el)) == b.end()) {
auto const it = b.find(GetKey()(el));
if (it == b.end() || GetValue()(el) != GetValue()(*it)) {
return false;
}
}
Expand Down

0 comments on commit e5602b8

Please sign in to comment.