]> git.saurik.com Git - wxWidgets.git/commitdiff
use reserve() instead of Alloc() in WX_APPEND_ARRAY so that it works with std classes too
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 30 Sep 2007 10:44:45 +0000 (10:44 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 30 Sep 2007 10:44:45 +0000 (10:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dynarray.h

index e0b9d4f7301ccac2ff6c9190e0595aefa078c502..d165c3bc5ca8e4b47e062a866d80d02012a15627 100644 (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]);                                \