]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynarray.cpp
added AcceptsFocus() { return FALSE; }
[wxWidgets.git] / src / common / dynarray.cpp
index cf2334db5797d5aaa1c0cf1eeb40a9e4970b977c..ee700fbb0c1cb7863c552faa3dff21d1e1ba5e26 100644 (file)
@@ -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);
 }