From: Vadim Zeitlin Date: Thu, 18 Nov 1999 14:54:02 +0000 (+0000) Subject: bug in wxArray::Remove() fixed (thanks Robert) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f373f1979884082bc201b49e921f8c2b2dc671d1?ds=inline bug in wxArray::Remove() fixed (thanks Robert) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index cafb60d33a..07f3f673bf 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -204,7 +204,7 @@ public: \ { int iIndex = Index(Item); \ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \ _WX_ERROR_REMOVE); \ - wxBaseArray::Remove((size_t)iIndex); } \ + wxBaseArray::RemoveAt((size_t)iIndex); } \ \ void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \ } @@ -267,7 +267,7 @@ public: \ { int iIndex = Index(Item); \ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \ _WX_ERROR_REMOVE ); \ - wxBaseArray::Remove((size_t)iIndex); } \ + wxBaseArray::RemoveAt((size_t)iIndex); } \ \ private: \ SCMPFUNC##T m_fnCompare; \ diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index ed85392df3..bbf54265c4 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -278,7 +278,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