Changeset 52580 in vbox for trunk/include/iprt
- Timestamp:
- Sep 3, 2014 12:01:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/ministring.h
r52549 r52580 33 33 34 34 #include <new> 35 #include <algorithm>36 35 37 36 … … 880 879 /** 881 880 * Swaps two strings in a fast way. 881 * 882 882 * Exception safe. 883 883 * 884 * @param that the string to swap for */ 885 inline void swap(RTCString &that) throw() 886 { 887 std::swap(m_psz, that.m_psz); 888 std::swap(m_cch, that.m_cch); 889 std::swap(m_cbAllocated, that.m_cbAllocated); 884 * @param a_rThat The string to swap with. 885 */ 886 inline void swap(RTCString &a_rThat) throw() 887 { 888 char *pszTmp = m_psz; 889 size_t cchTmp = m_cch; 890 size_t cbAllocatedTmp = m_cbAllocated; 891 892 m_psz = a_rThat.m_psz; 893 m_cch = a_rThat.m_cch; 894 m_cbAllocated = a_rThat.m_cbAllocated; 895 896 a_rThat.m_psz = pszTmp; 897 a_rThat.m_cch = cchTmp; 898 a_rThat.m_cbAllocated = cbAllocatedTmp; 890 899 } 891 900
Note:
See TracChangeset
for help on using the changeset viewer.