]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed bug recently introduced in wxSortedArray::Index()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 25 Apr 2003 12:06:25 +0000 (12:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 25 Apr 2003 12:06:25 +0000 (12:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dynarray.cpp

index 012c6077a324155f5b7b24b1009c4659e3dc4098..573114aec0017cd9175d83f1a797e0cbef3a870e 100644 (file)
@@ -285,8 +285,8 @@ int name::Index(T lItem, CMPFUNC fnCompare) const                           \
                                                                             \
     return n < m_nCount &&                                                  \
            (*fnCompare)((const void *)(long)lItem,                          \
-                        ((const void *)(long)m_pItems[n])) ? (int)n         \
-                                                           : wxNOT_FOUND;   \
+                        ((const void *)(long)m_pItems[n])) ? wxNOT_FOUND    \
+                                                           : (int)n;        \
 }                                                                           \
                                                                             \
 /* add item at the end */                                                   \