bug in wxArray::Remove() fixed (thanks Robert)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -204,7 +204,7 @@ public: \
|
|||||||
{ int iIndex = Index(Item); \
|
{ int iIndex = Index(Item); \
|
||||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||||
_WX_ERROR_REMOVE); \
|
_WX_ERROR_REMOVE); \
|
||||||
wxBaseArray::Remove((size_t)iIndex); } \
|
wxBaseArray::RemoveAt((size_t)iIndex); } \
|
||||||
\
|
\
|
||||||
void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \
|
void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ public: \
|
|||||||
{ int iIndex = Index(Item); \
|
{ int iIndex = Index(Item); \
|
||||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||||
_WX_ERROR_REMOVE ); \
|
_WX_ERROR_REMOVE ); \
|
||||||
wxBaseArray::Remove((size_t)iIndex); } \
|
wxBaseArray::RemoveAt((size_t)iIndex); } \
|
||||||
\
|
\
|
||||||
private: \
|
private: \
|
||||||
SCMPFUNC##T m_fnCompare; \
|
SCMPFUNC##T m_fnCompare; \
|
||||||
|
@@ -278,7 +278,7 @@ void wxBaseArray::Remove(long lItem)
|
|||||||
wxCHECK_RET( iIndex != wxNOT_FOUND,
|
wxCHECK_RET( iIndex != wxNOT_FOUND,
|
||||||
wxT("removing inexistent item in wxArray::Remove") );
|
wxT("removing inexistent item in wxArray::Remove") );
|
||||||
|
|
||||||
Remove((size_t)iIndex);
|
RemoveAt((size_t)iIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort array elements using passed comparaison function
|
// sort array elements using passed comparaison function
|
||||||
|
Reference in New Issue
Block a user