]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynarray.cpp
Added inline setters for wxTreeEvent so we don't need to add new
[wxWidgets.git] / src / common / dynarray.cpp
index 573114aec0017cd9175d83f1a797e0cbef3a870e..2b185f156f4f91f3ff4230645073df0c4f199e37 100644 (file)
@@ -283,10 +283,10 @@ int name::Index(T lItem, CMPFUNC fnCompare) const                           \
 {                                                                           \
     size_t n = IndexForInsert(lItem, fnCompare);                            \
                                                                             \
-    return n < m_nCount &&                                                  \
+    return (n >= m_nCount ||                                                \
            (*fnCompare)((const void *)(long)lItem,                          \
-                        ((const void *)(long)m_pItems[n])) ? wxNOT_FOUND    \
-                                                           : (int)n;        \
+                        ((const void *)(long)m_pItems[n]))) ? wxNOT_FOUND   \
+                                                            : (int)n;       \
 }                                                                           \
                                                                             \
 /* add item at the end */                                                   \