X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87cc1cc772c106ebd7e9bae9941ed2c002f4706a..687b91d266990129fbbb8c21d92fa4298b458352:/include/wx/dynarray.h diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 81c12e84b5..4c2584fb49 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -967,6 +967,18 @@ WX_DEFINE_USER_EXPORTED_ARRAY_PTR(void *, wxArrayPtrVoid, class WXDLLIMPEXP_BASE // convenience macros // ----------------------------------------------------------------------------- +// prepend all element of one array to another one; e.g. if first array contains +// elements X,Y,Z and the second contains A,B,C (in those orders), then the +// first array will be result as A,B,C,X,Y,Z +#define WX_PREPEND_ARRAY(array, other) \ + { \ + size_t wxAAcnt = (other).size(); \ + for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \ + { \ + (array).Insert((other)[wxAAn], wxAAn); \ + } \ + } + // append all element of one array to another one #define WX_APPEND_ARRAY(array, other) \ { \