// 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();
// 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));
{
int iIndex = Index(lItem);
- wxCHECK( iIndex != NOT_FOUND );
+ wxCHECK_RET( iIndex != NOT_FOUND,
+ "removing inexistent item in wxArray::Remove" );
Remove((uint)iIndex);
}