X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f77c0fe312a1dedde4a86c9b967d095802c10384..3cfde7c049bddf6fd3b4c2e35a6b8ecdcdc1d74f:/src/msw/registry.cpp?ds=sidebyside diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index f05a631e10..4067064673 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -385,7 +385,7 @@ bool wxRegKey::Open(AccessMode mode) m_dwLastError = ::RegOpenKeyEx ( (HKEY) m_hRootKey, - m_strKey.wx_str(), + m_strKey.t_str(), RESERVED, mode == Read ? KEY_READ : KEY_ALL_ACCESS, &tmpKey @@ -426,7 +426,7 @@ bool wxRegKey::Create(bool bOkIfExists) &tmpKey, &disposition); #else - m_dwLastError = RegCreateKey((HKEY) m_hRootKey, m_strKey.wx_str(), &tmpKey); + m_dwLastError = RegCreateKey((HKEY) m_hRootKey, m_strKey.t_str(), &tmpKey); #endif if ( m_dwLastError != ERROR_SUCCESS ) { wxLogSysError(m_dwLastError, _("Can't create registry key '%s'"), @@ -698,7 +698,7 @@ bool wxRegKey::DeleteSelf() // now delete this key itself Close(); - m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey.wx_str()); + m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey.t_str()); // deleting a key which doesn't exist is not considered an error if ( m_dwLastError != ERROR_SUCCESS && m_dwLastError != ERROR_FILE_NOT_FOUND ) { @@ -942,12 +942,12 @@ bool wxRegKey::QueryValue(const wxString& szValue, #ifndef __WXWINCE__ if ( (dwType == REG_EXPAND_SZ) && !raw ) { - DWORD dwExpSize = ::ExpandEnvironmentStrings(strValue.wx_str(), NULL, 0); + DWORD dwExpSize = ::ExpandEnvironmentStrings(strValue.t_str(), NULL, 0); bool ok = dwExpSize != 0; if ( ok ) { wxString strExpValue; - ok = ::ExpandEnvironmentStrings(strValue.wx_str(), + ok = ::ExpandEnvironmentStrings(strValue.t_str(), wxStringBuffer(strExpValue, dwExpSize), dwExpSize ) != 0; @@ -1197,7 +1197,7 @@ FormatAsHex(const void *data, // write all the rest as comma-separated bytes value.reserve(3*size + 10); - const char * const p = wx_static_cast(const char *, data); + const char * const p = static_cast(data); for ( size_t n = 0; n < size; n++ ) { // TODO: line wrapping: although not required by regedit, this makes @@ -1364,7 +1364,7 @@ bool wxRegKey::DoExport(wxOutputStream& ostr) const // dump all our values long dummy; wxString name; - wxRegKey& self = wx_const_cast(wxRegKey&, *this); + wxRegKey& self = const_cast(*this); bool cont = self.GetFirstValue(name, dummy); while ( cont ) { @@ -1408,7 +1408,7 @@ bool KeyExists(WXHKEY hRootKey, const wxString& szKey) if ( ::RegOpenKeyEx ( (HKEY)hRootKey, - szKey.wx_str(), + szKey.t_str(), RESERVED, KEY_READ, // we might not have enough rights for rw access &hkeyDummy @@ -1444,7 +1444,7 @@ inline void RemoveTrailingSeparator(wxString& str) inline const wxChar *RegValueStr(const wxString& szValue) { - return szValue.empty() ? (const wxChar*)NULL : szValue.wx_str(); + return szValue.empty() ? (const wxChar*)NULL : szValue.t_str(); } #endif // wxUSE_REGKEY