summaryrefslogtreecommitdiff
path: root/src/mongo/bson/oid.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-10 18:08:48 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-10 22:37:49 -0400
commitd7d1fdb75966c684e9a42150e6e9b69c4a10ee08 (patch)
treed28b0767cbd8c1a09535f1676152e7ac57e829ce /src/mongo/bson/oid.cpp
parenta9b6612f5322f916298c19a6728817a1034c6aab (diff)
downloadmongo-d7d1fdb75966c684e9a42150e6e9b69c4a10ee08.tar.gz
SERVER-17308 Replace boost::scoped_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/bson/oid.cpp')
-rw-r--r--src/mongo/bson/oid.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/bson/oid.cpp b/src/mongo/bson/oid.cpp
index e9c6b87eb3a..209d43a8a38 100644
--- a/src/mongo/bson/oid.cpp
+++ b/src/mongo/bson/oid.cpp
@@ -32,7 +32,6 @@
#include "mongo/bson/oid.h"
#include <boost/functional/hash.hpp>
-#include <boost/scoped_ptr.hpp>
#include "mongo/base/init.h"
#include "mongo/bson/bsonobjbuilder.h"
@@ -43,7 +42,7 @@
namespace mongo {
namespace {
- boost::scoped_ptr<AtomicUInt32> counter;
+ std::unique_ptr<AtomicUInt32> counter;
const std::size_t kTimestampOffset = 0;
const std::size_t kInstanceUniqueOffset = kTimestampOffset +
@@ -55,7 +54,7 @@ namespace {
MONGO_INITIALIZER_GENERAL(OIDGeneration, MONGO_NO_PREREQUISITES, ("default"))
(InitializerContext* context) {
- boost::scoped_ptr<SecureRandom> entropy(SecureRandom::create());
+ std::unique_ptr<SecureRandom> entropy(SecureRandom::create());
counter.reset(new AtomicUInt32(uint32_t(entropy->nextInt64())));
_instanceUnique = OID::InstanceUnique::generate(*entropy);
return Status::OK();
@@ -120,7 +119,7 @@ namespace {
}
void OID::regenMachineId() {
- boost::scoped_ptr<SecureRandom> entropy(SecureRandom::create());
+ std::unique_ptr<SecureRandom> entropy(SecureRandom::create());
_instanceUnique = InstanceUnique::generate(*entropy);
}