summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/list_indexes.cpp
diff options
context:
space:
mode:
authorQingyang Chen <qingyang.chen@10gen.com>2015-08-03 12:17:47 -0400
committerQingyang Chen <qingyang.chen@10gen.com>2015-08-04 16:12:30 -0400
commitbe8a683771004a2541c730a1ac0e35cd13e03a8b (patch)
tree20b31de1fea9f59011899b568771f069327f113f /src/mongo/db/commands/list_indexes.cpp
parent84182ff1575cbe868a89e7209f12ca665f4bda19 (diff)
downloadmongo-be8a683771004a2541c730a1ac0e35cd13e03a8b.tar.gz
SERVER-19364 move query stage OperationContext pointer management into the base class
Diffstat (limited to 'src/mongo/db/commands/list_indexes.cpp')
-rw-r--r--src/mongo/db/commands/list_indexes.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/commands/list_indexes.cpp b/src/mongo/db/commands/list_indexes.cpp
index 0f46e4e7427..0d4b86a06d8 100644
--- a/src/mongo/db/commands/list_indexes.cpp
+++ b/src/mongo/db/commands/list_indexes.cpp
@@ -45,12 +45,15 @@
#include "mongo/db/query/find_constants.h"
#include "mongo/db/service_context.h"
#include "mongo/db/storage/storage_engine.h"
+#include "mongo/stdx/memory.h"
namespace mongo {
using std::string;
using std::stringstream;
+using std::unique_ptr;
using std::vector;
+using stdx::make_unique;
/**
* Lists the indexes for a given collection.
@@ -143,8 +146,8 @@ public:
}
MONGO_WRITE_CONFLICT_RETRY_LOOP_END(txn, "listIndexes", ns.ns());
- std::unique_ptr<WorkingSet> ws(new WorkingSet());
- std::unique_ptr<QueuedDataStage> root(new QueuedDataStage(ws.get()));
+ auto ws = make_unique<WorkingSet>();
+ auto root = make_unique<QueuedDataStage>(txn, ws.get());
for (size_t i = 0; i < indexNames.size(); i++) {
BSONObj indexSpec;
@@ -173,7 +176,7 @@ public:
if (!statusWithPlanExecutor.isOK()) {
return appendCommandStatus(result, statusWithPlanExecutor.getStatus());
}
- std::unique_ptr<PlanExecutor> exec = std::move(statusWithPlanExecutor.getValue());
+ unique_ptr<PlanExecutor> exec = std::move(statusWithPlanExecutor.getValue());
BSONArrayBuilder firstBatch;