X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..0423b6851815f12d331cf09a0d05f117e5b803ca:/src/common/dynarray.cpp diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index cf2334db57..ee700fbb0c 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -147,7 +147,7 @@ void wxBaseArray::Alloc(uint uiSize) } // searches the array for an item (forward or backwards) -int wxBaseArray::Index(long lItem, Bool bFromEnd) const +int wxBaseArray::Index(long lItem, bool bFromEnd) const { if ( bFromEnd ) { if ( m_uiCount > 0 ) { @@ -179,7 +179,7 @@ void wxBaseArray::Add(long lItem) // add item at the given position void wxBaseArray::Insert(long lItem, uint uiIndex) { - wxCHECK( uiIndex <= m_uiCount ); + wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Insert" ); Grow(); @@ -192,7 +192,7 @@ void wxBaseArray::Insert(long lItem, uint uiIndex) // removes item from array (by index) void wxBaseArray::Remove(uint uiIndex) { - wxCHECK( uiIndex <= m_uiCount ); + wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Remove" ); memmove(&m_pItems[uiIndex], &m_pItems[uiIndex + 1], (m_uiCount - uiIndex - 1)*sizeof(long)); @@ -204,7 +204,8 @@ void wxBaseArray::Remove(long lItem) { int iIndex = Index(lItem); - wxCHECK( iIndex != NOT_FOUND ); + wxCHECK_RET( iIndex != NOT_FOUND, + "removing inexistent item in wxArray::Remove" ); Remove((uint)iIndex); }