]> git.saurik.com Git - wxWidgets.git/commitdiff
remove wxStringBase::AllocCopy(), it wasn't used anywhere
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 25 Mar 2007 19:46:05 +0000 (19:46 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 25 Mar 2007 19:46:05 +0000 (19:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h
src/common/string.cpp

index aa01f5fee3557ef227b896155369c033b826b15c..bc55fadaa4d1accf2d8a34e1b2c7db04057ed8d0 100644 (file)
@@ -291,8 +291,6 @@ protected:
   // memory allocation
     // allocates memory for string of length nLen
   bool AllocBuffer(size_t nLen);
-    // copies data to another string
-  bool AllocCopy(wxString&, int, int) const;
     // effectively copies data to string
   bool AssignCopy(size_t, const wxChar *);
 
index f26486112aaee9a34233162cf96f6271a4f60495..8d39d9ceeacaa09542cfe5ea569d906ab839908d 100644 (file)
@@ -891,26 +891,6 @@ bool wxStringBase::ConcatSelf(size_t nSrcLen, const wxChar *pszSrcData,
   return true;
 }
 
-// ---------------------------------------------------------------------------
-// simple sub-string extraction
-// ---------------------------------------------------------------------------
-
-// helper function: clone the data attached to this string
-bool wxStringBase::AllocCopy(wxString& dest, int nCopyLen, int nCopyIndex) const
-{
-  if ( nCopyLen == 0 ) {
-    dest.Init();
-  }
-  else {
-    if ( !dest.AllocBuffer(nCopyLen) ) {
-      // allocation failure handled by caller
-      return false;
-    }
-    memcpy(dest.m_pchData, m_pchData + nCopyIndex, nCopyLen*sizeof(wxChar));
-  }
-  return true;
-}
-
 #endif // !wxUSE_STL_BASED_WXSTRING
 
 #if !wxUSE_STL_BASED_WXSTRING || !defined(HAVE_STD_STRING_COMPARE)