]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common header file not applicable to open-vm-tools.
authorKruti Pendharkar <kp025370@broadcom.com>
Wed, 8 Jan 2025 06:05:51 +0000 (22:05 -0800)
committerKruti Pendharkar <kp025370@broadcom.com>
Wed, 8 Jan 2025 06:05:51 +0000 (22:05 -0800)
open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh

index 74f55f8b8faf99c8ee21680b902df3d7d08a7443..e5ef0de950458f22aa77f93f106b2c0fe5982f6b 100644 (file)
@@ -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<UTF8Data>(new UTF8Data(Util_SafeStrdup(s)));
+      mUTF8 = std::make_shared<UTF8Data>(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<wchar_t *>(mBstr) != NULL && !mUTF8) {
-      mUTF8 = s.mUTF8 = std::shared_ptr<UTF8Data>(new UTF8Data());
+      mUTF8 = s.mUTF8 = std::make_shared<UTF8Data>();
    }
 }
 
@@ -812,7 +812,7 @@ ubstr_t::GetUTF8Cache()
    }
 
    if (!mUTF8) {
-      mUTF8 = std::shared_ptr<UTF8Data>(new UTF8Data());
+      mUTF8 = std::make_shared<UTF8Data>();
    }
 
    if (mUTF8->Get() == NULL) {