X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fda7962d029672a5f4c718a3c6b2559856f4cd95..461fe6e2559a3096d4985a50ba106f26ed890a1d:/src/msw/regconf.cpp diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index 07af68b3a0..c7b7a470e6 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "regconf.h" #endif @@ -245,7 +245,8 @@ void wxRegConfig::SetPath(const wxString& strPath) size_t len = strFullPath.length(); const wxChar *end = src + len; - wxChar *dst = m_strPath.GetWriteBuf(len); + wxStringBufferLength buf(m_strPath, len); + wxChar *dst = buf; wxChar *start = dst; for ( ; src < end; src++, dst++ ) @@ -337,8 +338,7 @@ void wxRegConfig::SetPath(const wxString& strPath) } *dst = _T('\0'); - - m_strPath.UngetWriteBuf(dst - start); + buf.SetLength(dst - start); } #ifdef WX_DEBUG_SET_PATH @@ -355,7 +355,8 @@ void wxRegConfig::SetPath(const wxString& strPath) size_t len = m_strPath.length(); const wxChar *src = m_strPath.c_str(); - wxChar *dst = strRegPath.GetWriteBuf(len); + wxStringBufferLength buf(strRegPath, len); + wxChar *dst = buf; const wxChar *end = src + len; for ( ; src < end; src++, dst++ ) @@ -366,7 +367,7 @@ void wxRegConfig::SetPath(const wxString& strPath) *dst = *src; } - strRegPath.UngetWriteBuf(len); + buf.SetLength(len); } // this is not needed any longer as we don't create keys unnecessarily any