X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35d5da677d3203d7027eb28b1b6878be9d920108..32cdc45397d8c0a24735f84e1dcf83bba1980f2d:/include/wx/dynarray.h diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 1bbf53ed99..3c7f88926e 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -84,7 +84,7 @@ typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2); #if wxUSE_STL template -class WXDLLIMPEXP_BASE wxArray_SortFunction +class wxArray_SortFunction { public: typedef int (wxCMPFUNC_CONV *CMPFUNC)(T* pItem1, T* pItem2); @@ -97,7 +97,7 @@ private: }; template -class WXDLLIMPEXP_BASE wxSortedArray_SortFunction +class wxSortedArray_SortFunction { public: typedef F CMPFUNC; @@ -282,6 +282,13 @@ protected: \ const_iterator begin() const { return m_pItems; } \ const_iterator end() const { return m_pItems + m_nCount; } \ \ + void swap(name& other) \ + { \ + 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 */ \ /* they don't use the type of the elements at all */ \ public: \ @@ -487,6 +494,7 @@ public: \ void reserve(size_type n) { base::reserve(n); } \ void resize(size_type n, value_type v = value_type()) \ { base::resize(n, v); } \ + void swap(name& other) { base::swap(other); } \ } #define _WX_PTROP pointer operator->() const { return m_ptr; }