X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3096bd2fa7b88105bc54c08e3c878585de1a9b91..e421922f90186d0619a806d277a0a2182e61b5fb:/src/common/dynarray.cpp?ds=sidebyside diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index 04d89832e1..5b4d11e9b9 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -141,8 +141,6 @@ void wxBaseArray::Clear() // pre-allocates memory (frees the previous data!) void wxBaseArray::Alloc(size_t nSize) { - wxASSERT( nSize > 0 ); - // only if old buffer was not big enough if ( nSize > m_nSize ) { wxDELETEA(m_pItems); @@ -261,9 +259,9 @@ void wxBaseArray::Insert(long lItem, size_t nIndex) } // removes item from array (by index) -void wxBaseArray::Remove(size_t nIndex) +void wxBaseArray::RemoveAt(size_t nIndex) { - wxCHECK_RET( nIndex <= m_nCount, wxT("bad index in wxArray::Remove") ); + wxCHECK_RET( nIndex <= m_nCount, wxT("bad index in wxArray::RemoveAt") ); memmove(&m_pItems[nIndex], &m_pItems[nIndex + 1], (m_nCount - nIndex - 1)*sizeof(long)); @@ -278,7 +276,7 @@ void wxBaseArray::Remove(long lItem) wxCHECK_RET( iIndex != wxNOT_FOUND, wxT("removing inexistent item in wxArray::Remove") ); - Remove((size_t)iIndex); + RemoveAt((size_t)iIndex); } // sort array elements using passed comparaison function