From 72a4fa54d980d514f2cbd15e43cdb1f54902566e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 24 Sep 2009 00:21:36 +0000 Subject: [PATCH] Minor corrections to sorted arrays documentation. Mention that Remove() uses binary search for sorted arrays so the item removed by it is not necessarily the first one. Also correct documentation of Index() for sorted arrays which was incorrectly the same as for the normal kind. Closes #11233. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/dynarray.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/interface/wx/dynarray.h b/interface/wx/dynarray.h index 6001afe745..43779dc95c 100644 --- a/interface/wx/dynarray.h +++ b/interface/wx/dynarray.h @@ -553,6 +553,10 @@ public: 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); @@ -602,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. */ -- 2.45.2