Use attributes where possible
This commit is contained in:
@@ -72,7 +72,7 @@ static INT_PTR CALLBACK OKWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
{
|
||||
case IDOK:
|
||||
g_bHush = !!IsDlgButtonChecked( hWnd, IDC_HUSH );
|
||||
// fall through
|
||||
[[fallthrough]];
|
||||
case IDCANCEL:
|
||||
EndDialog( hWnd, 0 );
|
||||
break;
|
||||
@@ -146,7 +146,7 @@ static INT_PTR CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
DialogUtil::SetHeaderFont( hWnd, IDC_STATIC_HEADER_TEXT );
|
||||
|
||||
|
||||
// Set static text
|
||||
RString sMessage = g_sErrorString;
|
||||
sMessage.Replace( "\n", "\r\n" );
|
||||
@@ -183,8 +183,6 @@ static INT_PTR CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
||||
break;
|
||||
case IDC_BUTTON_RESTART:
|
||||
Win32RestartProgram();
|
||||
// Possibly make W32RP a SM_NORETURN call?
|
||||
FAIL_M("Win32RestartProgram failed?");
|
||||
case IDOK:
|
||||
EndDialog( hWnd, 0 );
|
||||
break;
|
||||
@@ -201,7 +199,7 @@ static INT_PTR CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
||||
{
|
||||
case IDC_STATIC_HEADER_TEXT:
|
||||
case IDC_STATIC_ICON:
|
||||
hbr = (HBRUSH)::GetStockObject(WHITE_BRUSH);
|
||||
hbr = (HBRUSH)::GetStockObject(WHITE_BRUSH);
|
||||
SetBkMode( hdc, OPAQUE );
|
||||
SetBkColor( hdc, RGB(255,255,255) );
|
||||
break;
|
||||
@@ -244,7 +242,7 @@ Dialog::Result DialogDriver_Win32::AbortRetryIgnore( RString sMessage, RString I
|
||||
default:
|
||||
FAIL_M(ssprintf("Unexpected response to Abort/Retry/Ignore dialog: %i", iRet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Dialog::Result DialogDriver_Win32::AbortRetry( RString sMessage, RString sID )
|
||||
{
|
||||
@@ -261,7 +259,7 @@ Dialog::Result DialogDriver_Win32::AbortRetry( RString sMessage, RString sID )
|
||||
default:
|
||||
FAIL_M(ssprintf("Unexpected response to Retry/Cancel dialog: %i", iRet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Dialog::Result DialogDriver_Win32::YesNo( RString sMessage, RString sID )
|
||||
{
|
||||
@@ -283,7 +281,7 @@ Dialog::Result DialogDriver_Win32::YesNo( RString sMessage, RString sID )
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard, Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -293,7 +291,7 @@ Dialog::Result DialogDriver_Win32::YesNo( RString sMessage, RString sID )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user