diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-10 01:21:01 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-10 01:59:35 -0400 |
commit | c36f9ecb91e49da7e637863889804fc4e6c6c05e (patch) | |
tree | 64d8aadb6d29042d4f4e7366bc1457e4e0612383 /src/mongo/platform/random.cpp | |
parent | c9548e729c8fecd9d7a9a5dd341da0433194ac73 (diff) | |
download | mongo-c36f9ecb91e49da7e637863889804fc4e6c6c05e.tar.gz |
SERVER-39339 Remove `stdx/memory.h`
Diffstat (limited to 'src/mongo/platform/random.cpp')
-rw-r--r-- | src/mongo/platform/random.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/platform/random.cpp b/src/mongo/platform/random.cpp index ec46ce8c2cc..f12ffb57a5d 100644 --- a/src/mongo/platform/random.cpp +++ b/src/mongo/platform/random.cpp @@ -46,8 +46,8 @@ #include <fstream> #include <iostream> #include <limits> +#include <memory> -#include "mongo/stdx/memory.h" #include "mongo/util/assert_util.h" #include "mongo/util/log.h" @@ -144,7 +144,7 @@ private: }; std::unique_ptr<SecureRandom> SecureRandom::create() { - return stdx::make_unique<WinSecureRandom>(); + return std::make_unique<WinSecureRandom>(); } #elif defined(__linux__) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__) || \ @@ -153,7 +153,7 @@ std::unique_ptr<SecureRandom> SecureRandom::create() { class InputStreamSecureRandom : public SecureRandom { public: InputStreamSecureRandom(const char* fn) { - _in = stdx::make_unique<std::ifstream>(fn, std::ios::binary | std::ios::in); + _in = std::make_unique<std::ifstream>(fn, std::ios::binary | std::ios::in); if (!_in->is_open()) { error() << "cannot open " << fn << " " << strerror(errno); fassertFailed(28839); @@ -175,7 +175,7 @@ private: }; std::unique_ptr<SecureRandom> SecureRandom::create() { - return stdx::make_unique<InputStreamSecureRandom>("/dev/urandom"); + return std::make_unique<InputStreamSecureRandom>("/dev/urandom"); } #elif defined(__OpenBSD__) @@ -190,7 +190,7 @@ public: }; std::unique_ptr<SecureRandom> SecureRandom::create() { - return stdx::make_unique<Arc4SecureRandom>(); + return std::make_unique<Arc4SecureRandom>(); } #else |