wxArrayString::wxArrayString(size_t sz, const char** a)
{
-#if !wxUSE_STL
+#if !wxUSE_STD_CONTAINERS
Init(false);
#endif
for (size_t i=0; i < sz; i++)
wxArrayString::wxArrayString(size_t sz, const wchar_t** a)
{
-#if !wxUSE_STL
+#if !wxUSE_STD_CONTAINERS
Init(false);
#endif
for (size_t i=0; i < sz; i++)
wxArrayString::wxArrayString(size_t sz, const wxString* a)
{
-#if !wxUSE_STL
+#if !wxUSE_STD_CONTAINERS
Init(false);
#endif
for (size_t i=0; i < sz; i++)
Add(a[i]);
}
-#if !wxUSE_STL
+#if !wxUSE_STD_CONTAINERS
// size increment = min(50% of current size, ARRAY_MAXSIZE_INCREMENT)
#define ARRAY_MAXSIZE_INCREMENT 4096
pNew[j] = m_pItems[j];
delete [] m_pItems;
m_pItems = pNew;
+ m_nSize = m_nCount;
}
}
}
}
+void wxArrayString::resize(size_type n, value_type v)
+{
+ if ( n < m_nCount )
+ m_nCount = n;
+ else if ( n > m_nCount )
+ Add(v, n - m_nCount);
+}
+
// expand the array
void wxArrayString::SetCount(size_t count)
{
return true;
}
-#endif // !wxUSE_STL
+#endif // !wxUSE_STD_CONTAINERS
// ===========================================================================
// wxJoin and wxSplit