Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 15e3fed

Browse files
vil02realstealthninja
andauthored
style: add missing const in bloom_filter.cpp (TheAlgorithms#2724)
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
1 parent ef209df commit 15e3fed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎data_structures/bloom_filter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ static void test_bloom_filter_string() {
228228
10, {data_structures::hashDJB2, data_structures::hashStr});
229229
std::vector<std::string> toCheck{"hello", "world", "!"};
230230
std::vector<std::string> toFalse{"false", "world2", "!!!"};
231-
for (auto& x : toCheck) {
231+
for (constauto& x : toCheck) {
232232
filter.add(x);
233233
}
234-
for (auto& x : toFalse) {
234+
for (constauto& x : toFalse) {
235235
assert(filter.contains(x) == false);
236236
}
237-
for (auto& x : toCheck) {
237+
for (constauto& x : toCheck) {
238238
assert(filter.contains(x));
239239
}
240240
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /