X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eaf6da074684bb26937905e8a0369009e2c03da2..cbab1556578ae39b1f00e0c4f6ca8016ac8124ac:/src/common/arrstr.cpp?ds=inline diff --git a/src/common/arrstr.cpp b/src/common/arrstr.cpp index bb22e7e88c..be461cc639 100644 --- a/src/common/arrstr.cpp +++ b/src/common/arrstr.cpp @@ -206,6 +206,7 @@ void wxArrayString::Shrink() pNew[j] = m_pItems[j]; delete [] m_pItems; m_pItems = pNew; + m_nSize = m_nCount; } } @@ -344,6 +345,14 @@ wxArrayString::insert(iterator it, const_iterator first, const_iterator last) } } +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) { @@ -378,13 +387,6 @@ void wxArrayString::Remove(const wxString& sz) RemoveAt(iIndex); } -void wxArrayString::assign(const_iterator first, const_iterator last) -{ - reserve(last - first); - for(; first != last; ++first) - push_back(*first); -} - // ---------------------------------------------------------------------------- // sorting // ----------------------------------------------------------------------------