// Created: 12.09.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
{ \
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]))) ? wxNOT_FOUND \
+ : (int)n; \
} \
\
/* add item at the end */ \