X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/001ad728a48bcfc7a763027b41f10ba1a25ce276..e5280d4fa4589378f29f12d6ded991e660892ade:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 9b8823d05f..208a77c020 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1061,7 +1061,7 @@ bool wxString::Shrink() #if !wxUSE_STL // get the pointer to writable buffer of (at least) nLen bytes -wxChar *wxString::GetWriteBuf(size_t nLen) +wxChar *wxString::DoGetWriteBuf(size_t nLen) { if ( !AllocBeforeWrite(nLen) ) { // allocation failure handled by caller @@ -1075,12 +1075,12 @@ wxChar *wxString::GetWriteBuf(size_t nLen) } // put string back in a reasonable state after GetWriteBuf -void wxString::UngetWriteBuf() +void wxString::DoUngetWriteBuf() { - UngetWriteBuf(wxStrlen(m_pchData)); + DoUngetWriteBuf(wxStrlen(m_pchData)); } -void wxString::UngetWriteBuf(size_t nLen) +void wxString::DoUngetWriteBuf(size_t nLen) { wxStringData * const pData = GetStringData(); @@ -1091,8 +1091,28 @@ void wxString::UngetWriteBuf(size_t nLen) pData->nDataLength = nLen; pData->Validate(true); } + +// deprecated compatibility code: +#if WXWIN_COMPATIBILITY_2_8 +wxChar *wxString::GetWriteBuf(size_t nLen) +{ + return DoGetWriteBuf(nLen); +} + +void wxString::UngetWriteBuf() +{ + DoUngetWriteBuf(); +} + +void wxString::UngetWriteBuf(size_t nLen) +{ + DoUngetWriteBuf(nLen); +} +#endif // WXWIN_COMPATIBILITY_2_8 + #endif // !wxUSE_STL + // --------------------------------------------------------------------------- // data access // --------------------------------------------------------------------------- @@ -2231,30 +2251,6 @@ void wxArrayString::Shrink() } } -#if WXWIN_COMPATIBILITY_2_4 - -// return a wxString[] as required for some control ctors. -wxString* wxArrayString::GetStringArray() const -{ - wxString *array = 0; - - if( m_nCount > 0 ) - { - array = new wxString[m_nCount]; - for( size_t i = 0; i < m_nCount; i++ ) - array[i] = m_pItems[i]; - } - - return array; -} - -void wxArrayString::Remove(size_t nIndex, size_t nRemove) -{ - RemoveAt(nIndex, nRemove); -} - -#endif // WXWIN_COMPATIBILITY_2_4 - // searches the array for an item (forward or backwards) int wxArrayString::Index(const wxChar *sz, bool bCase, bool bFromEnd) const {