X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e75b65f7c801f98fd75e0863d29d59e4b12b6fb..8ddd9176a46065ab74d6ced1ed480e5affb4e1e2:/src/common/dynarray.cpp diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index 738e9813a3..4f4915a25b 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -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() \