Use std::make_unique

PiperOrigin-RevId: 525828947
Change-Id: I66f47c835bc93ba171eba0da8df09eff89c6c77b
pull/4223/head
Tom Hughes 2 years ago committed by Copybara-Service
parent d7fb5e1af4
commit 9c1efac2a1
  1. 2
      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());
}

Loading…
Cancel
Save