diff options
author | Qingyang Chen <qingyang.chen@10gen.com> | 2015-06-25 13:50:50 -0400 |
---|---|---|
committer | Qingyang Chen <qingyang.chen@10gen.com> | 2015-06-29 16:05:26 -0400 |
commit | 9d72fd0f2f18b66423b9107e30cf2792656d2eab (patch) | |
tree | 20a29314d23e781d0e01ce9a8e877294abe6a6de /src/mongo/db/exec/index_scan.cpp | |
parent | d7466fbe4ec1be205945170f038bbc37737abcb1 (diff) | |
download | mongo-9d72fd0f2f18b66423b9107e30cf2792656d2eab.tar.gz |
SERVER-16889.5 PlanExecutor::getStats() and PlanStage::getStats() return unique_ptr
Diffstat (limited to 'src/mongo/db/exec/index_scan.cpp')
-rw-r--r-- | src/mongo/db/exec/index_scan.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp index b7a963d3fd8..396c8a32f54 100644 --- a/src/mongo/db/exec/index_scan.cpp +++ b/src/mongo/db/exec/index_scan.cpp @@ -39,6 +39,7 @@ #include "mongo/db/index/index_access_method.h" #include "mongo/db/index/index_descriptor.h" #include "mongo/db/query/index_bounds_builder.h" +#include "mongo/stdx/memory.h" #include "mongo/util/log.h" namespace { @@ -282,7 +283,7 @@ std::vector<PlanStage*> IndexScan::getChildren() const { return {}; } -PlanStageStats* IndexScan::getStats() { +std::unique_ptr<PlanStageStats> IndexScan::getStats() { // WARNING: this could be called even if the collection was dropped. Do not access any // catalog information here. @@ -302,9 +303,10 @@ PlanStageStats* IndexScan::getStats() { _specificStats.direction = _params.direction; } - std::unique_ptr<PlanStageStats> ret(new PlanStageStats(_commonStats, STAGE_IXSCAN)); - ret->specific.reset(new IndexScanStats(_specificStats)); - return ret.release(); + std::unique_ptr<PlanStageStats> ret = + stdx::make_unique<PlanStageStats>(_commonStats, STAGE_IXSCAN); + ret->specific = stdx::make_unique<IndexScanStats>(_specificStats); + return ret; } const CommonStats* IndexScan::getCommonStats() const { |