Skip to content

Commit

Permalink
style: add missing const in bloom_filter.cpp (#2724)
Browse files Browse the repository at this point in the history
Co-authored-by: realstealthninja <[email protected]>
  • Loading branch information
vil02 and realstealthninja authored Sep 4, 2024
1 parent ef209df commit 15e3fed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_structures/bloom_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ static void test_bloom_filter_string() {
10, {data_structures::hashDJB2, data_structures::hashStr});
std::vector<std::string> toCheck{"hello", "world", "!"};
std::vector<std::string> toFalse{"false", "world2", "!!!"};
for (auto& x : toCheck) {
for (const auto& x : toCheck) {
filter.add(x);
}
for (auto& x : toFalse) {
for (const auto& x : toFalse) {
assert(filter.contains(x) == false);
}
for (auto& x : toCheck) {
for (const auto& x : toCheck) {
assert(filter.contains(x));
}
}
Expand Down

0 comments on commit 15e3fed

Please sign in to comment.