X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2efaf754519420bd5de4d11dbdd085ba88c63124..85b1997c095b18cd5e9e54e9d39feaa71c5ffa06:/interface/wx/dynarray.h diff --git a/interface/wx/dynarray.h b/interface/wx/dynarray.h index 84c4e16e0a..43779dc95c 100644 --- a/interface/wx/dynarray.h +++ b/interface/wx/dynarray.h @@ -546,12 +546,18 @@ public: @code T *item = array[n]; + array.Remove(item); delete item; - array.Remove(n); @endcode See also WX_CLEAR_ARRAY() macro which deletes all elements of a wxArray (supposed to contain pointers). + + Notice that for sorted arrays this method uses binary search to find + the item so it doesn't necessarily remove the first matching item, but + the first one found by the binary search. + + @see RemoveAt() */ void Remove(T item); @@ -600,8 +606,8 @@ public: /** This version of Index() is for wxSortedArray only. - Searches the element in the array, starting from either beginning or - the end depending on the value of @a searchFromEnd parameter. + Searches for the element in the array, using binary search. + @c wxNOT_FOUND is returned if the element is not found, otherwise the index of the element is returned. */