]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynarray.h
wxUSE_PROPGRID is now recognized by source and header files
[wxWidgets.git] / include / wx / dynarray.h
index 8e579a9c647dac17537c8c6356dc290466aad399..1aaa3e7caf301e8ba22be70f4eac665348d32662 100644 (file)
@@ -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 */ \