Changeset 85288 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Jul 13, 2020 12:19:47 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139265
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/string.cpp
r84339 r85288 620 620 { 621 621 m_bstr = ::SysAllocString(a_bstrSrc); 622 if (!m_bstr) 622 if (RT_LIKELY(m_bstr)) 623 { /* likely */ } 624 else 623 625 throw std::bad_alloc(); 624 626 } … … 632 634 cleanup(); 633 635 copyFrom(a_bstrSrc); 636 } 637 638 639 HRESULT Bstr::cleanupAndCopyFromEx(const OLECHAR *a_bstrSrc) RT_NOEXCEPT 640 { 641 cleanup(); 642 643 if (a_bstrSrc && *a_bstrSrc) 644 { 645 m_bstr = ::SysAllocString(a_bstrSrc); 646 if (RT_LIKELY(m_bstr)) 647 { /* likely */ } 648 else 649 return E_OUTOFMEMORY; 650 } 651 else 652 m_bstr = NULL; 653 return S_OK; 634 654 } 635 655
Note:
See TracChangeset
for help on using the changeset viewer.