Added C/wxString array constructors to wxArrayString

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-03-26 14:18:56 +00:00
parent f36a04a7b6
commit d44d0cbd73
4 changed files with 36 additions and 3 deletions

View File

@@ -2032,6 +2032,24 @@ int wxString::sprintf(const wxChar *pszFormat, ...)
#include "wx/arrstr.h"
wxArrayString::wxArrayString(size_t sz, const wxChar** a)
{
#if !wxUSE_STL
Init(false);
#endif
for (size_t i=0; i < sz; i++)
Add(a[i]);
}
wxArrayString::wxArrayString(size_t sz, const wxString* a)
{
#if !wxUSE_STL
Init(false);
#endif
for (size_t i=0; i < sz; i++)
Add(a[i]);
}
#if !wxUSE_STL
// size increment = min(50% of current size, ARRAY_MAXSIZE_INCREMENT)