Fix wxSortedArray::Index() when wxUSE_STL == 1, with tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2005-01-22 13:28:49 +00:00
parent 104fa1124d
commit 10dcbe6369
2 changed files with 15 additions and 2 deletions

View File

@@ -99,8 +99,8 @@ int name::Index(T lItem, CMPFUNC fnCompare) const \
{ \
Predicate p((SCMPFUNC)fnCompare); \
const_iterator it = std::lower_bound(begin(), end(), lItem, p); \
return (it != end() && \
p(lItem, *it)) ? (int)(it - begin()) : wxNOT_FOUND; \
return (it != end() && !p(lItem, *it)) ? \
(int)(it - begin()) : wxNOT_FOUND; \
} \
\
void name::Shrink() \