summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbhelpers.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-10 17:43:13 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-10 22:37:44 -0400
commita9b6612f5322f916298c19a6728817a1034c6aab (patch)
tree0da5b1ce36e6a8e2d85dbdeb49d505ac99bf6e1d /src/mongo/db/dbhelpers.cpp
parent0ec1e625760eb9c1a20a3dba78200e8f9ff28d9e (diff)
downloadmongo-a9b6612f5322f916298c19a6728817a1034c6aab.tar.gz
SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/dbhelpers.cpp')
-rw-r--r--src/mongo/db/dbhelpers.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp
index 93dd0b05dde..ae5444b8c1a 100644
--- a/src/mongo/db/dbhelpers.cpp
+++ b/src/mongo/db/dbhelpers.cpp
@@ -68,7 +68,7 @@
namespace mongo {
- using std::auto_ptr;
+ using std::unique_ptr;
using std::endl;
using std::ios_base;
using std::ofstream;
@@ -145,7 +145,7 @@ namespace mongo {
&rawExec,
options).isOK());
- auto_ptr<PlanExecutor> exec(rawExec);
+ unique_ptr<PlanExecutor> exec(rawExec);
PlanExecutor::ExecState state;
RecordId loc;
if (PlanExecutor::ADVANCED == (state = exec->getNext(NULL, &loc))) {
@@ -200,7 +200,7 @@ namespace mongo {
bool Helpers::getSingleton(OperationContext* txn, const char *ns, BSONObj& result) {
AutoGetCollectionForRead ctx(txn, ns);
- auto_ptr<PlanExecutor> exec(InternalPlanner::collectionScan(txn, ns, ctx.getCollection()));
+ unique_ptr<PlanExecutor> exec(InternalPlanner::collectionScan(txn, ns, ctx.getCollection()));
PlanExecutor::ExecState state = exec->getNext(&result, NULL);
CurOp::get(txn)->done();
@@ -214,7 +214,7 @@ namespace mongo {
bool Helpers::getLast(OperationContext* txn, const char *ns, BSONObj& result) {
AutoGetCollectionForRead autoColl(txn, ns);
- auto_ptr<PlanExecutor> exec(InternalPlanner::collectionScan(txn,
+ unique_ptr<PlanExecutor> exec(InternalPlanner::collectionScan(txn,
ns,
autoColl.getCollection(),
InternalPlanner::BACKWARD));
@@ -366,7 +366,7 @@ namespace mongo {
collection->getIndexCatalog()->findIndexByKeyPattern( txn,
indexKeyPattern.toBSON() );
- auto_ptr<PlanExecutor> exec(InternalPlanner::indexScan(txn, collection, desc,
+ unique_ptr<PlanExecutor> exec(InternalPlanner::indexScan(txn, collection, desc,
min, max,
maxInclusive,
InternalPlanner::FORWARD,
@@ -539,7 +539,7 @@ namespace mongo {
bool isLargeChunk = false;
long long docCount = 0;
- auto_ptr<PlanExecutor> exec(
+ unique_ptr<PlanExecutor> exec(
InternalPlanner::indexScan(txn, collection, idx, min, max, false));
// we can afford to yield here because any change to the base data that we might miss is
// already being queued and will be migrated in the 'transferMods' stage