From: Václav Slavík Date: Sun, 30 Sep 2007 10:44:45 +0000 (+0000) Subject: use reserve() instead of Alloc() in WX_APPEND_ARRAY so that it works with std classes too X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cd643444314b6b488c9ecaf7c971f2a7abafca18 use reserve() instead of Alloc() in WX_APPEND_ARRAY so that it works with std classes too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index e0b9d4f730..d165c3bc5c 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -1006,7 +1006,7 @@ WX_DEFINE_USER_EXPORTED_ARRAY_PTR(void *, wxArrayPtrVoid, class WXDLLIMPEXP_BASE #define WX_PREPEND_ARRAY(array, other) \ { \ size_t wxAAcnt = (other).size(); \ - (array).Alloc(wxAAcnt); \ + (array).reserve(wxAAcnt); \ for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \ { \ (array).Insert((other)[wxAAn], wxAAn); \ @@ -1017,7 +1017,7 @@ WX_DEFINE_USER_EXPORTED_ARRAY_PTR(void *, wxArrayPtrVoid, class WXDLLIMPEXP_BASE #define WX_APPEND_ARRAY(array, other) \ { \ size_t wxAAcnt = (other).size(); \ - (array).Alloc(wxAAcnt); \ + (array).reserve(wxAAcnt); \ for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \ { \ (array).push_back((other)[wxAAn]); \