style: add missing const in bloom_filter.cpp (#2724)

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
This commit is contained in:
Piotr Idzik
2024-09-05 01:54:16 +02:00
committed by GitHub
parent ef209dfab3
commit 15e3fed924

View File

@@ -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));
}
}