X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/05fafecd1afa43e4f5166e593bbe50699245e4a5..0423b6851815f12d331cf09a0d05f117e5b803ca:/src/common/dynarray.cpp diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index eb67d34504..ee700fbb0c 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -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); }