Use std::make_unique
PiperOrigin-RevId: 525828947 Change-Id: I66f47c835bc93ba171eba0da8df09eff89c6c77b
This commit is contained in:
parent
d7fb5e1af4
commit
9c1efac2a1
@ -204,7 +204,7 @@ class GTEST_API_ AssertionResult {
|
|||||||
private:
|
private:
|
||||||
// Appends the contents of message to message_.
|
// Appends the contents of message to message_.
|
||||||
void AppendMessage(const Message& a_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());
|
message_->append(a_message.GetString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user