]> git.saurik.com Git - wxWidgets.git/commitdiff
Compilation fix for wxUSE_STL && !wxUSE_STL_BASED_WXSTRING build.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 23 May 2012 21:16:35 +0000 (21:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 23 May 2012 21:16:35 +0000 (21:16 +0000)
Don't rely on implicit wxString to "const char*" conversion in Replace().

Closes #14327.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index 4798b67c9c3ea58e54718de03075c502fd6d521c..3dea38ec671f18cb97e66c8eef8c9247224178f6 100644 (file)
@@ -1436,7 +1436,7 @@ size_t wxString::Replace(const wxString& strOld,
     }
     else if ( !bReplaceAll)
     {
     }
     else if ( !bReplaceAll)
     {
-        size_t pos = m_impl.find(strOld, 0);
+        size_t pos = m_impl.find(strOld.m_impl, 0);
         if ( pos != npos )
         {
             m_impl.replace(pos, strOld.m_impl.length(), strNew.m_impl);
         if ( pos != npos )
         {
             m_impl.replace(pos, strOld.m_impl.length(), strNew.m_impl);