diff options
author | misterg <misterg@google.com> | 2018-10-30 13:49:22 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-31 01:20:43 (GMT) |
commit | e857f9cdd998136b9aad634272301f5b2d0476ea (patch) | |
tree | fb1ddc72b8448eba93fde494bdf12347ab52bc66 /googletest/src | |
parent | e0d3c37051865bf2ec32de3be0a408a8f2a106ac (diff) | |
download | googletest-e857f9cdd998136b9aad634272301f5b2d0476ea.zip googletest-e857f9cdd998136b9aad634272301f5b2d0476ea.tar.gz googletest-e857f9cdd998136b9aad634272301f5b2d0476ea.tar.bz2 |
Googletest export
Remove scoped_ptr replace with std::unique_ptr
PiperOrigin-RevId: 219291284
Diffstat (limited to 'googletest/src')
-rw-r--r-- | googletest/src/gtest-internal-inl.h | 7 | ||||
-rw-r--r-- | googletest/src/gtest-port.cc | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h index f05de04..91f923d 100644 --- a/googletest/src/gtest-internal-inl.h +++ b/googletest/src/gtest-internal-inl.h @@ -42,6 +42,7 @@ #include <string.h> // For memmove. #include <algorithm> +#include <memory> #include <string> #include <vector> @@ -913,8 +914,8 @@ class GTEST_API_ UnitTestImpl { #if GTEST_HAS_DEATH_TEST // The decomposed components of the gtest_internal_run_death_test flag, // parsed when RUN_ALL_TESTS is called. - internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_; - internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_; + std::unique_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_; + std::unique_ptr<internal::DeathTestFactory> death_test_factory_; #endif // GTEST_HAS_DEATH_TEST // A per-thread stack of traces created by the SCOPED_TRACE() macro. @@ -1174,7 +1175,7 @@ class StreamingListener : public EmptyTestEventListener { std::string FormatBool(bool value) { return value ? "1" : "0"; } - const scoped_ptr<AbstractSocketWriter> socket_writer_; + const std::unique_ptr<AbstractSocketWriter> socket_writer_; GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener); }; // class StreamingListener diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 2cac34e..950c16b 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -410,14 +410,14 @@ class ThreadWithParamSupport : public ThreadWithParamBase { : runnable_(runnable), thread_can_start_(thread_can_start) { } - scoped_ptr<Runnable> runnable_; + std::unique_ptr<Runnable> runnable_; // Does not own. Notification* thread_can_start_; }; static DWORD WINAPI ThreadMain(void* ptr) { // Transfers ownership. - scoped_ptr<ThreadMainParam> param(static_cast<ThreadMainParam*>(ptr)); + std::unique_ptr<ThreadMainParam> param(static_cast<ThreadMainParam*>(ptr)); if (param->thread_can_start_ != nullptr) param->thread_can_start_->WaitForNotification(); param->runnable_->Run(); |