diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-06-10 18:08:48 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-06-10 22:37:49 -0400 |
commit | d7d1fdb75966c684e9a42150e6e9b69c4a10ee08 (patch) | |
tree | d28b0767cbd8c1a09535f1676152e7ac57e829ce /src/mongo/db/storage/kv/kv_catalog.cpp | |
parent | a9b6612f5322f916298c19a6728817a1034c6aab (diff) | |
download | mongo-d7d1fdb75966c684e9a42150e6e9b69c4a10ee08.tar.gz |
SERVER-17308 Replace boost::scoped_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/storage/kv/kv_catalog.cpp')
-rw-r--r-- | src/mongo/db/storage/kv/kv_catalog.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mongo/db/storage/kv/kv_catalog.cpp b/src/mongo/db/storage/kv/kv_catalog.cpp index 53382bd8b93..6797cdf5bff 100644 --- a/src/mongo/db/storage/kv/kv_catalog.cpp +++ b/src/mongo/db/storage/kv/kv_catalog.cpp @@ -32,7 +32,6 @@ #include "mongo/db/storage/kv/kv_catalog.h" -#include <boost/scoped_ptr.hpp> #include <stdlib.h> #include "mongo/db/concurrency/d_concurrency.h" @@ -54,7 +53,7 @@ namespace { const ResourceId resourceIdCatalogMetadata(RESOURCE_METADATA, 1ULL); } - using boost::scoped_ptr; + using std::unique_ptr; using std::string; class KVCatalog::AddIdentChange : public RecoveryUnit::Change { @@ -107,7 +106,7 @@ namespace { std::string KVCatalog::_newRand() { return str::stream() - << boost::scoped_ptr<SecureRandom>(SecureRandom::create())->nextInt64(); + << std::unique_ptr<SecureRandom>(SecureRandom::create())->nextInt64(); } bool KVCatalog::_hasEntryCollidingWithRand() const { @@ -162,7 +161,7 @@ namespace { invariant( opCtx->lockState() == NULL || opCtx->lockState()->isDbLockedForMode( nsToDatabaseSubstring(ns), MODE_X ) ); - boost::scoped_ptr<Lock::ResourceLock> rLk; + std::unique_ptr<Lock::ResourceLock> rLk; if (!_isRsThreadSafe && opCtx->lockState()) { rLk.reset(new Lock::ResourceLock(opCtx->lockState(), resourceIdCatalogMetadata, @@ -219,7 +218,7 @@ namespace { StringData ns, RecordId* out ) const { - boost::scoped_ptr<Lock::ResourceLock> rLk; + std::unique_ptr<Lock::ResourceLock> rLk; if (!_isRsThreadSafe && opCtx->lockState()) { rLk.reset(new Lock::ResourceLock(opCtx->lockState(), resourceIdCatalogMetadata, @@ -266,7 +265,7 @@ namespace { StringData ns, BSONCollectionCatalogEntry::MetaData& md ) { - boost::scoped_ptr<Lock::ResourceLock> rLk; + std::unique_ptr<Lock::ResourceLock> rLk; if (!_isRsThreadSafe && opCtx->lockState()) { rLk.reset(new Lock::ResourceLock(opCtx->lockState(), resourceIdCatalogMetadata, @@ -320,7 +319,7 @@ namespace { StringData toNS, bool stayTemp ) { - boost::scoped_ptr<Lock::ResourceLock> rLk; + std::unique_ptr<Lock::ResourceLock> rLk; if (!_isRsThreadSafe && opCtx->lockState()) { rLk.reset(new Lock::ResourceLock(opCtx->lockState(), resourceIdCatalogMetadata, @@ -371,7 +370,7 @@ namespace { StringData ns ) { invariant( opCtx->lockState() == NULL || opCtx->lockState()->isDbLockedForMode( nsToDatabaseSubstring(ns), MODE_X ) ); - boost::scoped_ptr<Lock::ResourceLock> rLk; + std::unique_ptr<Lock::ResourceLock> rLk; if (!_isRsThreadSafe && opCtx->lockState()) { rLk.reset(new Lock::ResourceLock(opCtx->lockState(), resourceIdCatalogMetadata, |