diff options
author | Juan Gu <juan.gu@mongodb.com> | 2023-05-05 17:59:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-17 22:34:33 +0000 |
commit | 02bf3f55f88874bf397b42758c9cd36093633f9e (patch) | |
tree | 3964271e581d4b735252c2462e9a2bdf32df47f6 /src/mongo/embedded | |
parent | 41c95363ac628dd0a89fb18c369b0fdef42496e2 (diff) | |
download | mongo-02bf3f55f88874bf397b42758c9cd36093633f9e.tar.gz |
SERVER-60173 Ban implicit capture of `this` via `[=]` in lambda expressions
Diffstat (limited to 'src/mongo/embedded')
-rw-r--r-- | src/mongo/embedded/stitch_support/stitch_support_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/embedded/stitch_support/stitch_support_test.cpp b/src/mongo/embedded/stitch_support/stitch_support_test.cpp index f1c0ab59b4b..443464596f9 100644 --- a/src/mongo/embedded/stitch_support/stitch_support_test.cpp +++ b/src/mongo/embedded/stitch_support/stitch_support_test.cpp @@ -98,7 +98,7 @@ protected: ASSERT(matcher); ON_BLOCK_EXIT([matcher] { stitch_support_v1_matcher_destroy(matcher); }); return std::all_of( - documentsJSON.begin(), documentsJSON.end(), [=](const char* documentJSON) { + documentsJSON.begin(), documentsJSON.end(), [=, this](const char* documentJSON) { bool isMatch; stitch_support_v1_check_match( matcher, toBSONForAPI(documentJSON).first, &isMatch, nullptr); @@ -153,7 +153,7 @@ protected: std::transform(documentsJSON.begin(), documentsJSON.end(), std::back_inserter(results), - [=](const char* documentJSON) { + [=, this](const char* documentJSON) { auto bson = stitch_support_v1_projection_apply( projection, toBSONForAPI(documentJSON).first, nullptr); auto result = fromBSONForAPI(bson); |