diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-01-09 17:32:12 -0500 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2019-01-11 10:50:23 -0500 |
commit | bbf28648de0d8695c502e13922a8d9e5ca1b51e8 (patch) | |
tree | 6382810d03fb698d9b2d49f488be90e604324811 /src/mongo/rpc | |
parent | 17514947cc816df2500aa0e919506586d4d56aa0 (diff) | |
download | mongo-bbf28648de0d8695c502e13922a8d9e5ca1b51e8.tar.gz |
SERVER-30711: scope_guard rewrite, to avoid -Werror=noexcept-type
Macro ON_BLOCK_EXIT(...) now takes a single callable,
Some renames:
Dismias -> dismiss
MakeGuard => makeGuard
Diffstat (limited to 'src/mongo/rpc')
-rw-r--r-- | src/mongo/rpc/metadata/client_metadata_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/rpc/object_check_test.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/rpc/metadata/client_metadata_test.cpp b/src/mongo/rpc/metadata/client_metadata_test.cpp index fd02aee23c3..30985af8b3c 100644 --- a/src/mongo/rpc/metadata/client_metadata_test.cpp +++ b/src/mongo/rpc/metadata/client_metadata_test.cpp @@ -257,7 +257,7 @@ TEST(ClientMetadatTest, TestNegativeWrongTypes) { // Negative: document larger than 512 bytes TEST(ClientMetadatTest, TestNegativeLargeDocument) { bool savedMongos = isMongos(); - auto unsetMongoS = MakeGuard(&setMongos, savedMongos); + auto unsetMongoS = makeGuard([&] { setMongos(savedMongos); }); setMongos(true); { diff --git a/src/mongo/rpc/object_check_test.cpp b/src/mongo/rpc/object_check_test.cpp index f9d96f7f242..80e3e179fbc 100644 --- a/src/mongo/rpc/object_check_test.cpp +++ b/src/mongo/rpc/object_check_test.cpp @@ -48,7 +48,7 @@ TEST(DataTypeValidated, BSONValidationEnabled) { bool wasEnabled = serverGlobalParams.objcheck; const auto setValidation = [&](bool enabled) { serverGlobalParams.objcheck = enabled; }; - ON_BLOCK_EXIT(setValidation, wasEnabled); + ON_BLOCK_EXIT([=] { setValidation(wasEnabled); }); using std::begin; using std::end; |