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
This commit is contained in:
Václav Slavík
2007-09-30 10:44:45 +00:00
parent 7262371cd7
commit cd64344431

View File

@@ -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]); \