Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0c44636

Browse files
committed
No capture
1 parent b39286b commit 0c44636

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fml/container_unittests.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ namespace {
1313

1414
TEST(ContainerTest, MapEraseIf) {
1515
std::unordered_map<int, int> map = {{0, 1}, {2, 3}, {4, 5}};
16-
fml::erase_if(map, [&](auto it) { return it.first == 0 || it.second == 5; });
17-
EXPECT_EQ(map.size(), 1);
16+
17+
fml::erase_if(map, [](auto it) { return it->first == 0 || it->second == 5; });
18+
19+
EXPECT_EQ(map.size(), 1u);
1820
EXPECT_TRUE(map.find(2) != map.end());
1921
}
2022

0 commit comments

Comments
 (0)