X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2794028ded48b73cf45a3bc6ab9d20bee3a6be0..7a344f1be4ff59b7b150ab52265693d4219de973:/include/wx/dynarray.h?ds=inline diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 8e579a9c64..1aaa3e7caf 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -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 */ \