X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f373f1979884082bc201b49e921f8c2b2dc671d1..794bcc2dea743ac907b839f54e451847c9ea4b72:/include/wx/dynarray.h diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 07f3f673bf..109a89437c 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -308,7 +308,7 @@ public: \ \ T* Detach(size_t uiIndex) \ { T* p = (T*)wxBaseArray::Item(uiIndex); \ - wxBaseArray::Remove(uiIndex); return p; } \ + wxBaseArray::RemoveAt(uiIndex); return p; } \ void Remove(size_t uiIndex) { RemoveAt(uiIndex); } \ void RemoveAt(size_t uiIndex); \ \ @@ -448,6 +448,16 @@ WX_DEFINE_EXPORTED_ARRAY(void *, wxArrayPtrVoid); // convinience macros // ----------------------------------------------------------------------------- +// append all element of one array to another one +#define WX_APPEND_ARRAY(array, other) \ + { \ + size_t count = other.Count(); \ + for ( size_t n = 0; n < count; n++ ) \ + { \ + array.Add(other[n]); \ + } \ + } + // delete all array elements // // NB: the class declaration of the array elements must be visible from the