diff options
Diffstat (limited to 'src/mongo/db/exec/limit.cpp')
-rw-r--r-- | src/mongo/db/exec/limit.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/exec/limit.cpp b/src/mongo/db/exec/limit.cpp index a62f6e863e3..adbe343eb46 100644 --- a/src/mongo/db/exec/limit.cpp +++ b/src/mongo/db/exec/limit.cpp @@ -30,12 +30,14 @@ #include "mongo/db/exec/scoped_timer.h" #include "mongo/db/exec/working_set_common.h" +#include "mongo/stdx/memory.h" #include "mongo/util/mongoutils/str.h" namespace mongo { using std::unique_ptr; using std::vector; +using stdx::make_unique; // static const char* LimitStage::kStageType = "LIMIT"; @@ -113,12 +115,12 @@ vector<PlanStage*> LimitStage::getChildren() const { return children; } -PlanStageStats* LimitStage::getStats() { +unique_ptr<PlanStageStats> LimitStage::getStats() { _commonStats.isEOF = isEOF(); - unique_ptr<PlanStageStats> ret(new PlanStageStats(_commonStats, STAGE_LIMIT)); - ret->specific.reset(new LimitStats(_specificStats)); - ret->children.push_back(_child->getStats()); - return ret.release(); + unique_ptr<PlanStageStats> ret = make_unique<PlanStageStats>(_commonStats, STAGE_LIMIT); + ret->specific = make_unique<LimitStats>(_specificStats); + ret->children.push_back(_child->getStats().release()); + return ret; } const CommonStats* LimitStage::getCommonStats() const { |