summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/getmore_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/getmore_cmd.cpp')
-rw-r--r--src/mongo/db/commands/getmore_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp
index ea669c4a209..8f3eee6d760 100644
--- a/src/mongo/db/commands/getmore_cmd.cpp
+++ b/src/mongo/db/commands/getmore_cmd.cpp
@@ -401,7 +401,7 @@ public:
}
// On early return, get rid of the cursor.
- ScopeGuard cursorFreer = MakeGuard(&ClientCursorPin::deleteUnderlying, &ccPin);
+ auto cursorFreer = makeGuard([&] { ccPin.deleteUnderlying(); });
// We must respect the read concern from the cursor.
applyCursorReadConcern(opCtx, cursor->getReadConcernArgs());
@@ -528,7 +528,7 @@ public:
curOp->debug().nreturned = numResults;
if (respondWithId) {
- cursorFreer.Dismiss();
+ cursorFreer.dismiss();
}
// We're about to unpin or delete the cursor as the ClientCursorPin goes out of scope.