wxSortedArray::Add must return the index of the newly

inserted item.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-07-10 19:32:04 +00:00
parent fcd0c90f75
commit 6992d326eb
2 changed files with 9 additions and 8 deletions

View File

@@ -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