]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynarray.cpp
added opengl libs for gcc and watcom
[wxWidgets.git] / src / common / dynarray.cpp
index 39db10d384bab1b0c0acab4c136212f113f8cde8..038947c6bade74dc367de3746e5b97e28450de0b 100644 (file)
@@ -78,11 +78,12 @@ int name::Index(T lItem, bool bFromEnd) const                               \
 }                                                                           \
                                                                             \
 /* add item assuming the array is sorted with fnCompare function */         \
 }                                                                           \
                                                                             \
 /* add item assuming the array is sorted with fnCompare function */         \
-void name::Add(T lItem, CMPFUNC fnCompare)                                  \
+size_t name::Add(T lItem, CMPFUNC fnCompare)                                \
 {                                                                           \
 {                                                                           \
-  Insert(lItem, IndexForInsert(lItem, fnCompare));                          \
-}                                                                           \
-                                                                            \
+  size_t idx = IndexForInsert(lItem, fnCompare);                            \
+  Insert(lItem, idx);                                                       \
+  return idx;                                                               \
+}
 
 #if wxUSE_STL
 
 
 #if wxUSE_STL