diff options
author | Tom Hughes <tomhughes@google.com> | 2023-04-20 20:08:47 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-04-20 20:09:18 (GMT) |
commit | 9c1efac2a1b6d836ef35e1dfb87b7addca361afe (patch) | |
tree | df75204e0b8926406c06a2d0a2f532b6b0d2ffa3 /googletest/include/gtest/gtest-assertion-result.h | |
parent | d7fb5e1af4a4840f28e442cb5414766d4fb17522 (diff) | |
download | googletest-9c1efac2a1b6d836ef35e1dfb87b7addca361afe.zip googletest-9c1efac2a1b6d836ef35e1dfb87b7addca361afe.tar.gz googletest-9c1efac2a1b6d836ef35e1dfb87b7addca361afe.tar.bz2 |
Use std::make_unique
PiperOrigin-RevId: 525828947
Change-Id: I66f47c835bc93ba171eba0da8df09eff89c6c77b
Diffstat (limited to 'googletest/include/gtest/gtest-assertion-result.h')
-rw-r--r-- | googletest/include/gtest/gtest-assertion-result.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/include/gtest/gtest-assertion-result.h b/googletest/include/gtest/gtest-assertion-result.h index 62fbea6..56fe128 100644 --- a/googletest/include/gtest/gtest-assertion-result.h +++ b/googletest/include/gtest/gtest-assertion-result.h @@ -204,7 +204,7 @@ class GTEST_API_ AssertionResult { private: // Appends the contents of message to message_. void AppendMessage(const Message& a_message) { - if (message_ == nullptr) message_.reset(new ::std::string); + if (message_ == nullptr) message_ = ::std::make_unique<::std::string>(); message_->append(a_message.GetString().c_str()); } |