diff options
author | David Storch <david.storch@mongodb.com> | 2019-09-04 15:32:56 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-04 15:32:56 +0000 |
commit | b13188206e74dbeb66c4b663d83ed1d1f97c286b (patch) | |
tree | 01bcfe63112a9a4981a622a5370493d7d089a7a5 /src/mongo/db/exec/limit.cpp | |
parent | d9d50312ccdfcfb628d89f34c0dcda05c8f921bc (diff) | |
download | mongo-b13188206e74dbeb66c4b663d83ed1d1f97c286b.tar.gz |
SERVER-42852 Make PlanStage consistently hold children by unique_ptr.
Diffstat (limited to 'src/mongo/db/exec/limit.cpp')
-rw-r--r-- | src/mongo/db/exec/limit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/exec/limit.cpp b/src/mongo/db/exec/limit.cpp index 605babeeb31..e800d614039 100644 --- a/src/mongo/db/exec/limit.cpp +++ b/src/mongo/db/exec/limit.cpp @@ -43,10 +43,13 @@ using std::vector; // static const char* LimitStage::kStageType = "LIMIT"; -LimitStage::LimitStage(OperationContext* opCtx, long long limit, WorkingSet* ws, PlanStage* child) +LimitStage::LimitStage(OperationContext* opCtx, + long long limit, + WorkingSet* ws, + std::unique_ptr<PlanStage> child) : PlanStage(kStageType, opCtx), _ws(ws), _numToReturn(limit) { _specificStats.limit = _numToReturn; - _children.emplace_back(child); + _children.emplace_back(std::move(child)); } LimitStage::~LimitStage() {} |