[1231183] 'cleanup: mismatched indentation' and other cleanings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-22 17:13:46 +00:00
parent 7448de8d8d
commit 92218ce600
8 changed files with 292 additions and 283 deletions

View File

@@ -710,20 +710,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 +734,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;