summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog
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/catalog
parent0ec1e625760eb9c1a20a3dba78200e8f9ff28d9e (diff)
downloadmongo-a9b6612f5322f916298c19a6728817a1034c6aab.tar.gz
SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r--src/mongo/db/catalog/database.cpp6
-rw-r--r--src/mongo/db/catalog/index_catalog.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/catalog/database.cpp b/src/mongo/db/catalog/database.cpp
index 1ac2e3f1c58..7753235fa8f 100644
--- a/src/mongo/db/catalog/database.cpp
+++ b/src/mongo/db/catalog/database.cpp
@@ -65,7 +65,7 @@
namespace mongo {
- using std::auto_ptr;
+ using std::unique_ptr;
using std::endl;
using std::list;
using std::set;
@@ -181,10 +181,10 @@ namespace mongo {
return collection;
}
- auto_ptr<CollectionCatalogEntry> cce( _dbEntry->getCollectionCatalogEntry( fullns ) );
+ unique_ptr<CollectionCatalogEntry> cce( _dbEntry->getCollectionCatalogEntry( fullns ) );
invariant( cce.get() );
- auto_ptr<RecordStore> rs( _dbEntry->getRecordStore( fullns ) );
+ unique_ptr<RecordStore> rs( _dbEntry->getRecordStore( fullns ) );
invariant( rs.get() ); // if cce exists, so should this
// Not registering AddCollectionChange since this is for collections that already exist.
diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp
index 9e20c50656c..734c6c6e412 100644
--- a/src/mongo/db/catalog/index_catalog.cpp
+++ b/src/mongo/db/catalog/index_catalog.cpp
@@ -65,7 +65,7 @@
namespace mongo {
- using std::auto_ptr;
+ using std::unique_ptr;
using std::endl;
using std::string;
using std::vector;
@@ -164,9 +164,9 @@ namespace {
IndexCatalogEntry* IndexCatalog::_setupInMemoryStructures(OperationContext* txn,
IndexDescriptor* descriptor,
bool initFromDisk) {
- auto_ptr<IndexDescriptor> descriptorCleanup( descriptor );
+ unique_ptr<IndexDescriptor> descriptorCleanup( descriptor );
- auto_ptr<IndexCatalogEntry> entry( new IndexCatalogEntry( _collection->ns().ns(),
+ unique_ptr<IndexCatalogEntry> entry( new IndexCatalogEntry( _collection->ns().ns(),
_collection->getCatalogEntry(),
descriptorCleanup.release(),
_collection->infoCache() ) );
@@ -385,7 +385,7 @@ namespace {
IndexDescriptor* descriptor = new IndexDescriptor( _collection,
IndexNames::findPluginName(keyPattern),
_spec );
- auto_ptr<IndexDescriptor> descriptorCleaner( descriptor );
+ unique_ptr<IndexDescriptor> descriptorCleaner( descriptor );
_indexName = descriptor->indexName();
_indexNamespace = descriptor->indexNamespace();