]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynarray.cpp
implemented fallback for AlphaBlend() for the systems not supporting it
[wxWidgets.git] / src / common / dynarray.cpp
index c6890ce3a09c4cd44bf7889b6d84e1081b0067b3..012c6077a324155f5b7b24b1009c4659e3dc4098 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     12.09.97
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
 // Created:     12.09.97
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -283,7 +283,10 @@ int name::Index(T lItem, CMPFUNC fnCompare) const                           \
 {                                                                           \
     size_t n = IndexForInsert(lItem, fnCompare);                            \
                                                                             \
 {                                                                           \
     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 */                                                   \
 }                                                                           \
                                                                             \
 /* add item at the end */                                                   \