VirtualBox

Changeset 85314 in vbox


Ignore:
Timestamp:
Jul 13, 2020 5:24:18 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139292
Message:

VBox/com/string.h: Corrected Utf8Str::cloneToEx implementation to actually not throw anything. bugref:9790

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/string.h

    r85308 r85314  
    12841284     * @returns S_OK or E_OUTOFMEMORY (COM status codes).
    12851285     */
    1286     HRESULT cloneToEx(BSTR *pbstr) const
    1287     {
    1288         if (!pbstr)
    1289             return S_OK;
    1290         Bstr bstr(*this);
    1291         return bstr.detachToEx(pbstr);
    1292     }
     1286    HRESULT cloneToEx(BSTR *pbstr) const RT_NOEXCEPT;
    12931287
    12941288    /**
  • trunk/src/VBox/Main/glue/string.cpp

    r85306 r85314  
    730730}
    731731#endif
     732
     733HRESULT Utf8Str::cloneToEx(BSTR *pbstr) const RT_NOEXCEPT
     734{
     735    if (!pbstr)
     736        return S_OK;
     737    Bstr bstr;
     738    HRESULT hrc = bstr.assignEx(*this);
     739    if (SUCCEEDED(hrc))
     740        hrc = bstr.detachToEx(pbstr);
     741    return hrc;
     742}
    732743
    733744Utf8Str& Utf8Str::stripTrailingSlash()
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette