Skip to content

Commit

Permalink
unneccessary comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
BelimFaux committed Jan 10, 2025
1 parent 8ea2ecb commit 76a836d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/EH_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ typename EH_set<Key, N>::size_type EH_set<Key, N>::erase(const key_type &key) {
template <typename Key, size_t N>
typename EH_set<Key, N>::size_type
EH_set<Key, N>::count(const key_type &key) const {
return buckets[hasher{}(key) & (nD - 1)]->find(key) == N ? 0 : 1;
return buckets[hasher{}(key) & (nD - 1)]->find(key) != N;
}

// hash and call Bucket find
Expand Down

0 comments on commit 76a836d

Please sign in to comment.