util/IntrusiveHashSet: check key equivalence in remove_and_dispose_if()

This commit is contained in:
Max Kellermann 2022-12-01 18:52:52 +01:00 committed by Max Kellermann
parent e2abade6aa
commit c65b1fee8d
1 changed files with 3 additions and 1 deletions

View File

@ -214,7 +214,9 @@ public:
static_assert(!constant_time_size, "Not yet implemented");
auto &bucket = GetBucket(key);
bucket.remove_and_dispose_if(pred, disposer);
bucket.remove_and_dispose_if([this, &key, &pred](const auto &item){
return equal(key, item) && pred(item);
}, disposer);
}
[[nodiscard]]