]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
avoid duplicated empty help menu in localized applications (patch 1600747)
[wxWidgets.git] / src / common / string.cpp
index 9b8823d05f07f7504df6bdceb3a556081dfb20a4..208a77c0203b12bf196990100322363083b2728e 100644 (file)
@@ -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
 {