From: Kruti Pendharkar Date: Wed, 8 Jan 2025 06:05:51 +0000 (-0800) Subject: Change to common header file not applicable to open-vm-tools. X-Git-Tag: stable-13.0.0~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9114284d9a9c2a186ef10d59dd3be1dfe99e107;p=thirdparty%2Fopen-vm-tools.git Change to common header file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh b/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh index 74f55f8b8..e5ef0de95 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh @@ -238,7 +238,7 @@ ubstr_t::ubstr_t(const char *s) // IN: A UTF-8-encoded string. { if (s != NULL) { // Since we already have the UTF-8 version of the string, cache it now. - mUTF8 = std::shared_ptr(new UTF8Data(Util_SafeStrdup(s))); + mUTF8 = std::make_shared(Util_SafeStrdup(s)); mBstr = auto_unique(Unicode_GetAllocUTF16(s), free).get(); } } @@ -283,7 +283,7 @@ ubstr_t::ubstr_t(const ubstr_t& s) // IN mUTF8(s.mUTF8) { if (static_cast(mBstr) != NULL && !mUTF8) { - mUTF8 = s.mUTF8 = std::shared_ptr(new UTF8Data()); + mUTF8 = s.mUTF8 = std::make_shared(); } } @@ -812,7 +812,7 @@ ubstr_t::GetUTF8Cache() } if (!mUTF8) { - mUTF8 = std::shared_ptr(new UTF8Data()); + mUTF8 = std::make_shared(); } if (mUTF8->Get() == NULL) {