]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
On Robert's request I have added the html-version of my wxQt proposal.
[wxWidgets.git] / src / common / string.cpp
index 3e5e41f2d6007604f6075f9fc0ed12800b2758d0..3031ae6dafe7ccde81f696a18e5b88d89a8285dc 100644 (file)
@@ -61,8 +61,6 @@ static int g_strEmpty[] = { -1,     // ref count (locked)
                              0,     // current length
                              0,     // allocated memory
                              0 };   // string data
-// empty string shares memory with g_strEmpty
-static wxStringData *g_strNul = (wxStringData*)&g_strEmpty;
 // empty C style string: points to 'string data' byte of g_strEmpty
 extern const char *g_szNul = (const char *)(&g_strEmpty[3]);
 
@@ -907,7 +905,7 @@ int wxString::Scanf(const char *pszFormat, ...) const
 
 int wxString::ScanfV(const char *pszFormat, va_list argptr) const
 {
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
   wxMessageBox("ScanfV not implemented");
   return 0;
 #else
@@ -993,6 +991,7 @@ wxString& wxString::insert(size_t nPos, const wxString& str)
   strncpy(pc, c_str(), nPos);
   strcpy(pc + nPos, str);
   strcpy(pc + nPos + str.Len(), c_str() + nPos);
+  strTmp.UngetWriteBuf();
   *this = strTmp;
     
   return *this;