fixed bug with searching in sorted arrays
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dc7219d2e1
commit
4365da58c8
@ -28,6 +28,7 @@ All:
|
||||
wxBase:
|
||||
|
||||
- added Watcom makefiles
|
||||
- fixed bug with searching in sorted arrays (Jürgen Palm)
|
||||
|
||||
All GUI ports:
|
||||
|
||||
|
@ -283,7 +283,10 @@ int name::Index(T lItem, CMPFUNC fnCompare) const \
|
||||
{ \
|
||||
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 */ \
|
||||
|
Loading…
Reference in New Issue
Block a user