Changeset 85288 in vbox for trunk/include/VBox
- 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/include/VBox/com/string.h
r84341 r85288 173 173 } 174 174 175 /** 176 * Extended assignment method that returns a COM status code instead of an 177 * exception on failure. 178 * 179 * @returns S_OK or E_OUTOFMEMORY. 180 * @param a_rSrcStr The source string 181 */ 182 HRESULT assignEx(const Bstr &a_rSrcStr) RT_NOEXCEPT 183 { 184 return cleanupAndCopyFromEx((const OLECHAR *)a_rSrcStr.m_bstr); 185 } 186 187 /** 188 * Extended assignment method that returns a COM status code instead of an 189 * exception on failure. 190 * 191 * @returns S_OK or E_OUTOFMEMORY. 192 * @param a_pSrcStr The source string 193 */ 194 HRESULT assignEx(CBSTR a_pSrcStr) RT_NOEXCEPT 195 { 196 return cleanupAndCopyFromEx((const OLECHAR *)a_pSrcStr); 197 } 198 175 199 #ifdef _MSC_VER 176 200 # if _MSC_VER >= 1400 … … 950 974 /** cleanup() + copyFrom() - for assignment operators. */ 951 975 void cleanupAndCopyFrom(const OLECHAR *a_bstrSrc); 976 977 /** 978 * Protected internal helper to copy a string, implying cleanup(). 979 * 980 * This variant copies from a zero-terminated UTF-16 string (which need not be a 981 * BSTR, i.e. need not have a length prefix). 982 * 983 * If the source is empty, this sets the member string to NULL. 984 * 985 * @param a_bstrSrc The source string. The caller guarantees 986 * that this is valid UTF-16. 987 * @returns S_OK or E_OUTOFMEMORY 988 */ 989 HRESULT cleanupAndCopyFromEx(const OLECHAR *a_bstrSrc) RT_NOEXCEPT; 952 990 953 991 /**
Note:
See TracChangeset
for help on using the changeset viewer.