Skip to content

Commit

Permalink
Don't use std::end
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Apr 29, 2019
1 parent fadecb0 commit 18dbd35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stl_logging_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static void TestSTLLogging() {
hs.insert(30);
ostringstream ss;
ss << hs;
EXPECT_TRUE(std::find(std::begin(permutations), std::end(permutations), ss.str()) != std::end(permutations));
EXPECT_TRUE(std::find(permutations.cbegin(), permutations.cend(), ss.str()) != permutations.cend());
hash_set<int> copied_hs(hs);
CHECK_EQ(hs, copied_hs); // This must compile.
}
Expand All @@ -136,7 +136,7 @@ static void TestSTLLogging() {
hm[30] = "thirty";
ostringstream ss;
ss << hm;
EXPECT_TRUE(std::find(std::begin(permutations), std::end(permutations), ss.str()) != std::end(permutations));
EXPECT_TRUE(std::find(permutations.cbegin(), permutations.cend(), ss.str()) != permutations.cend());
hash_map<int, string> copied_hm(hm);
CHECK_EQ(hm, copied_hm); // this must compile
}
Expand Down Expand Up @@ -188,7 +188,7 @@ static void TestSTLLogging() {
hs.insert(30);
ostringstream ss;
ss << hs;
EXPECT_TRUE(std::find(std::begin(permutations), std::end(permutations), ss.str()) != std::end(permutations));
EXPECT_TRUE(std::find(permutations.cbegin(), permutations.cend(), ss.str()) != permutations.cend());
hash_set<int, user_hash> copied_hs(hs);
CHECK_EQ(hs, copied_hs); // This must compile.
}
Expand Down

0 comments on commit 18dbd35

Please sign in to comment.