mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-03 02:29:53 +08:00
style: add missing const in bloom_filter.cpp (#2724)
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user