// ----------------------------------------------------------------------------
// 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);
{
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;
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();
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);