X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ffdbfc4a7647556f83b9534a1faad71136fcff2a..b541538fa514aaecb5c988f05a7d581d49074072:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 3c31939c81..224927aa1b 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -108,7 +108,7 @@ aStdKeys[] = // ---------------------------------------------------------------------------- // removes the trailing backslash from the string if it has one -static void RemoveTrailingSeparator(wxString& str); +static inline void RemoveTrailingSeparator(wxString& str); // returns true if given registry key exists static bool KeyExists(WXHKEY hRootKey, const wxChar *szKey); @@ -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);