// Created: 12.09.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
memcpy(pNew, m_pItems, m_nCount*sizeof(T)); \
delete [] m_pItems; \
m_pItems = pNew; \
+ \
+ /* update the size of the new block */ \
+ m_nSize = m_nCount; \
} \
+ /* else: don't do anything, better keep old memory block! */ \
} \
} \
\
{ \
size_t n = IndexForInsert(lItem, fnCompare); \
\
- return n < m_nCount && m_pItems[n] == lItem ? (int)n : wxNOT_FOUND; \
+ return n < m_nCount && \
+ (*fnCompare)((const void *)(long)lItem, \
+ ((const void *)(long)m_pItems[n])) ? (int)n \
+ : wxNOT_FOUND; \
} \
\
/* add item at the end */ \