From bcc3753fe927225e89fa951d955c36bb8d4a9d97 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:57:01 +0200 Subject: [PATCH] style: add missing `const` in `bloom_filter.cpp` --- data_structures/bloom_filter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)); } }