diff --git a/data_structures/bloom_filter.cpp b/data_structures/bloom_filter.cpp index 8ce1a0c78a1..e2f7372e0c4 100644 --- a/data_structures/bloom_filter.cpp +++ b/data_structures/bloom_filter.cpp @@ -228,13 +228,13 @@ static void test_bloom_filter_string() { 10, {data_structures::hashDJB2, data_structures::hashStr}); std::vector toCheck{"hello", "world", "!"}; std::vector 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)); } }