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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user