X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/873aefb8b92ed74919919cf62eef71d6fdf6eca0..cb0b7b7d811356f729315fc14c7e0d311f43384d:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 33eb4fae36..010ff1d301 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -12,10 +12,6 @@ // - add high level functions (RegisterOleServer, ...) /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "registry.h" -#endif - // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -710,20 +706,21 @@ bool wxRegKey::DeleteKey(const wxChar *szKey) bool wxRegKey::DeleteValue(const wxChar *szValue) { - if ( !Open() ) - return false; + if ( !Open() ) + return false; m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue); // deleting a value which doesn't exist is not considered an error if ( (m_dwLastError != ERROR_SUCCESS) && - (m_dwLastError != ERROR_FILE_NOT_FOUND) ) { - wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"), - szValue, GetName().c_str()); - return false; + (m_dwLastError != ERROR_FILE_NOT_FOUND) ) + { + wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"), + szValue, GetName().c_str()); + return false; } - return true; + return true; } // ---------------------------------------------------------------------------- @@ -733,8 +730,8 @@ bool wxRegKey::DeleteValue(const wxChar *szValue) // return true if value exists bool wxRegKey::HasValue(const wxChar *szValue) const { - // this function should be silent, so suppress possible messages from Open() - wxLogNull nolog; + // this function should be silent, so suppress possible messages from Open() + wxLogNull nolog; if ( !CONST_CAST Open(Read) ) return false; @@ -900,7 +897,7 @@ bool wxRegKey::QueryValue(const wxChar *szValue, { // first get the type and size of the data - DWORD dwType, dwSize; + DWORD dwType=REG_NONE, dwSize=0; m_dwLastError = RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED, &dwType, NULL, &dwSize); if ( m_dwLastError == ERROR_SUCCESS )