winhlp32: Simplify code that happened to work by chance (PVS-Studio).
This commit is contained in:
parent
a514fe7642
commit
9bf064a67a
|
@ -1519,11 +1519,11 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||||
case WM_INITMENUPOPUP:
|
case WM_INITMENUPOPUP:
|
||||||
win = (WINHELP_WINDOW*) GetWindowLongPtrW(hWnd, 0);
|
win = (WINHELP_WINDOW*) GetWindowLongPtrW(hWnd, 0);
|
||||||
CheckMenuItem((HMENU)wParam, MNID_OPTS_FONTS_SMALL,
|
CheckMenuItem((HMENU)wParam, MNID_OPTS_FONTS_SMALL,
|
||||||
MF_BYCOMMAND | (win->font_scale == 0) ? MF_CHECKED : 0);
|
(win->font_scale == 0) ? MF_CHECKED : MF_UNCHECKED);
|
||||||
CheckMenuItem((HMENU)wParam, MNID_OPTS_FONTS_NORMAL,
|
CheckMenuItem((HMENU)wParam, MNID_OPTS_FONTS_NORMAL,
|
||||||
MF_BYCOMMAND | (win->font_scale == 1) ? MF_CHECKED : 0);
|
(win->font_scale == 1) ? MF_CHECKED : MF_UNCHECKED);
|
||||||
CheckMenuItem((HMENU)wParam, MNID_OPTS_FONTS_LARGE,
|
CheckMenuItem((HMENU)wParam, MNID_OPTS_FONTS_LARGE,
|
||||||
MF_BYCOMMAND | (win->font_scale == 2) ? MF_CHECKED : 0);
|
(win->font_scale == 2) ? MF_CHECKED : MF_UNCHECKED);
|
||||||
break;
|
break;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
win = (WINHELP_WINDOW*) GetWindowLongPtrW(hWnd, 0);
|
win = (WINHELP_WINDOW*) GetWindowLongPtrW(hWnd, 0);
|
||||||
|
|
Loading…
Reference in New Issue