summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/mmap_v1/btree
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/storage/mmap_v1/btree
parent0ec1e625760eb9c1a20a3dba78200e8f9ff28d9e (diff)
downloadmongo-a9b6612f5322f916298c19a6728817a1034c6aab.tar.gz
SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/storage/mmap_v1/btree')
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_logic.h2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
index 48d9fe5319b..23f649bfcaa 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
@@ -35,7 +35,7 @@
namespace mongo {
- using std::auto_ptr;
+ using std::unique_ptr;
class MyHarnessHelper final : public HarnessHelper {
public:
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
index 98f1d1497e9..1afe24331cf 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
@@ -42,7 +42,7 @@
namespace mongo {
- using std::auto_ptr;
+ using std::unique_ptr;
using std::dec;
using std::endl;
using std::hex;
@@ -114,7 +114,7 @@ namespace mongo {
template <class BtreeLayout>
Status BtreeLogic<BtreeLayout>::Builder::addKey(const BSONObj& keyObj, const DiskLoc& loc) {
- auto_ptr<KeyDataOwnedType> key(new KeyDataOwnedType(keyObj));
+ unique_ptr<KeyDataOwnedType> key(new KeyDataOwnedType(keyObj));
if (key->dataSize() > BtreeLayout::KeyMax) {
string msg = str::stream() << "Btree::insert: key too large to index, failing "
@@ -148,7 +148,7 @@ namespace mongo {
invariant(_logic->pushBack(rightLeaf, loc, *key, DiskLoc()));
}
- _keyLast = key;
+ _keyLast = std::move(key);
return Status::OK();
}
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_logic.h b/src/mongo/db/storage/mmap_v1/btree/btree_logic.h
index 5b4fdc8205e..48a307f3b4d 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_logic.h
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_logic.h
@@ -121,7 +121,7 @@ namespace mongo {
DiskLoc _rightLeafLoc; // DiskLoc of right-most (highest) leaf bucket.
bool _dupsAllowed;
- std::auto_ptr<KeyDataOwnedType> _keyLast;
+ std::unique_ptr<KeyDataOwnedType> _keyLast;
// Not owned.
OperationContext* _txn;
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
index 87bfd0a03db..1c0bd1c1505 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
@@ -2128,7 +2128,7 @@ namespace mongo {
start.appendMinKey( "a" );
BSONObjBuilder end;
end.appendMaxKey( "a" );
- auto_ptr< BtreeCursor > c( BtreeCursor::make( nsdetails( ns() ),
+ unique_ptr< BtreeCursor > c( BtreeCursor::make( nsdetails( ns() ),
id(),
start.done(),
end.done(),
@@ -2193,7 +2193,7 @@ namespace mongo {
end.appendMaxKey( "a" );
BSONObj l = bt()->keyNode( 0 ).key.toBson();
string toInsert;
- auto_ptr< BtreeCursor > c( BtreeCursor::make( nsdetails( ns() ),
+ unique_ptr< BtreeCursor > c( BtreeCursor::make( nsdetails( ns() ),
id(),
start.done(),
end.done(),