X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0bb222915e5b1670a7f1b6ecdf375d7ead23d2e8..d2b23b67301bd2d286366d4326a21da3132558fa:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 674ebaf3a3..224927aa1b 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -967,7 +967,7 @@ bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue) { if ( CONST_CAST Open() ) { m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_SZ, - (RegString)strValue.c_str(), + (RegString)strValue.wx_str(), (strValue.Len() + 1)*sizeof(wxChar)); if ( m_dwLastError == ERROR_SUCCESS ) return true; @@ -1125,7 +1125,7 @@ static inline bool WriteAsciiString(wxOutputStream& ostr, const wxString& s) wxCharBuffer name(s.mb_str()); ostr.Write(name, strlen(name)); #else - ostr.Write(s, s.length()); + ostr.Write(s.mb_str(), s.length()); #endif return ostr.IsOk(); @@ -1413,7 +1413,7 @@ const wxChar *GetFullName(const wxRegKey *pKey, const wxChar *szValue) return s_str.c_str(); } -void RemoveTrailingSeparator(wxString& str) +inline void RemoveTrailingSeparator(wxString& str) { if ( !str.empty() && str.Last() == REG_SEPARATOR ) str.Truncate(str.Len() - 1);