X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9a40f7b86c35d9b119747103514c1b77a3b491a..b5b208a1796ecf1b9ab267d200705b4f3b4d10e3:/src/common/arrstr.cpp diff --git a/src/common/arrstr.cpp b/src/common/arrstr.cpp index 81252acc0b..be461cc639 100644 --- a/src/common/arrstr.cpp +++ b/src/common/arrstr.cpp @@ -206,7 +206,7 @@ void wxArrayString::Shrink() pNew[j] = m_pItems[j]; delete [] m_pItems; m_pItems = pNew; - m_nSize = m_nCount + m_nSize = m_nCount; } } @@ -345,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) {