summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_fetch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/query_stage_fetch.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_fetch.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/dbtests/query_stage_fetch.cpp b/src/mongo/dbtests/query_stage_fetch.cpp
index a03c7a64e8e..8e6b0930e90 100644
--- a/src/mongo/dbtests/query_stage_fetch.cpp
+++ b/src/mongo/dbtests/query_stage_fetch.cpp
@@ -138,8 +138,8 @@ public:
mockStage->pushBack(id);
}
- unique_ptr<FetchStage> fetchStage(
- new FetchStage(&_opCtx, &ws, mockStage.release(), nullptr, coll));
+ auto fetchStage =
+ std::make_unique<FetchStage>(&_opCtx, &ws, std::move(mockStage), nullptr, coll);
WorkingSetID id = WorkingSet::INVALID_ID;
PlanStage::StageState state;
@@ -207,8 +207,8 @@ public:
unique_ptr<MatchExpression> filterExpr = std::move(statusWithMatcher.getValue());
// Matcher requires that foo==6 but we only have data with foo==5.
- unique_ptr<FetchStage> fetchStage(
- new FetchStage(&_opCtx, &ws, mockStage.release(), filterExpr.get(), coll));
+ auto fetchStage = std::make_unique<FetchStage>(
+ &_opCtx, &ws, std::move(mockStage), filterExpr.get(), coll);
// First call should return a fetch request as it's not in memory.
WorkingSetID id = WorkingSet::INVALID_ID;