X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/360b63dd328617a32752f61b45d347963c6c5ee1..b4e4abb51c35065b48ce5abe6b727aac498101dd:/src/common/dynarray.cpp diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index 39db10d384..038947c6ba 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -78,11 +78,12 @@ int name::Index(T lItem, bool bFromEnd) const \ } \ \ /* 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