use wxSwap()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -284,17 +284,9 @@ protected: \
|
||||
\
|
||||
void swap(name& other) \
|
||||
{ \
|
||||
const size_t savedSize = m_nSize; \
|
||||
const size_t savedCount = m_nCount; \
|
||||
T * const savedItems = m_pItems; \
|
||||
\
|
||||
m_nSize = other.m_nSize; \
|
||||
m_nCount = other.m_nCount; \
|
||||
m_pItems = other.m_pItems; \
|
||||
\
|
||||
other.m_nSize = savedSize; \
|
||||
other.m_nCount = savedCount; \
|
||||
other.m_pItems = savedItems; \
|
||||
wxSwap(m_nSize, other.m_nSize); \
|
||||
wxSwap(m_nCount, other.m_nCount); \
|
||||
wxSwap(m_pItems, other.m_pItems); \
|
||||
} \
|
||||
\
|
||||
/* the following functions may be made directly public because */ \
|
||||
|
Reference in New Issue
Block a user