]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/arrstr.h
Removed wxPropertyGridInterface::SetPropertyAttributes()
[wxWidgets.git] / include / wx / arrstr.h
index ddb11c0a31527e9a1a84ea53c7c4474f2161a518..95b9506fdc82a3a1a066728a7cff7f737a056ad2 100644 (file)
@@ -303,22 +303,10 @@ public:
   size_type size() const { return GetCount(); }
   void swap(wxArrayString& other)
   {
-      // not sure if we can rely on having std::swap() everywhere so do it
-      // manually
-      const size_t savedSize = m_nSize;
-      const size_t savedCount = m_nCount;
-      wxString * const savedItems = m_pItems;
-      const bool savedAutoSort = m_autoSort;
-
-      m_nSize = other.m_nSize;
-      m_nCount = other.m_nCount;
-      m_pItems = other.m_pItems;
-      m_autoSort = other.m_autoSort;
-
-      other.m_nSize = savedSize;
-      other.m_nCount = savedCount;
-      other.m_pItems = savedItems;
-      other.m_autoSort = savedAutoSort;
+      wxSwap(m_nSize, other.m_nSize);
+      wxSwap(m_nCount, other.m_nCount);
+      wxSwap(m_pItems, other.m_pItems);
+      wxSwap(m_autoSort, other.m_autoSort);
   }
 
 protected: