{
if (s != NULL) {
// Since we already have the UTF-8 version of the string, cache it now.
- mUTF8 = std::shared_ptr<UTF8Data>(new UTF8Data(Util_SafeStrdup(s)));
+ mUTF8 = std::make_shared<UTF8Data>(Util_SafeStrdup(s));
mBstr = auto_unique(Unicode_GetAllocUTF16(s), free).get();
}
}
mUTF8(s.mUTF8)
{
if (static_cast<wchar_t *>(mBstr) != NULL && !mUTF8) {
- mUTF8 = s.mUTF8 = std::shared_ptr<UTF8Data>(new UTF8Data());
+ mUTF8 = s.mUTF8 = std::make_shared<UTF8Data>();
}
}
}
if (!mUTF8) {
- mUTF8 = std::shared_ptr<UTF8Data>(new UTF8Data());
+ mUTF8 = std::make_shared<UTF8Data>();
}
if (mUTF8->Get() == NULL) {