diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-20 17:38:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-20 17:38:06 +0000 |
commit | 6183362250af373372830fbd5d4d952b0038bbfc (patch) | |
tree | 986e7c937720b5d93e00dcc2e7ee3b2f47a7286d /plugins/Clist_modern/src/modern_clcmsgs.cpp | |
parent | 7e4a5794928702bf435f3d7be339a6c553fe618a (diff) |
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcmsgs.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcmsgs.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index 7875ba21ff..d31016b09f 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -49,7 +49,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara return 0;
case CLM_SETFONT:
- if (HIWORD(lParam) < 0 || HIWORD(lParam)>FONTID_MODERN_MAX) return 0;
+ if (HIWORD(lParam)>FONTID_MODERN_MAX) return 0;
dat->fontModernInfo[HIWORD(lParam)].hFont = (HFONT)wParam;
dat->fontModernInfo[HIWORD(lParam)].changed = 1;
@@ -62,18 +62,19 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara case CLM_SETHIDEEMPTYGROUPS:
{
- BOOL old = ((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS) != 0);
- BOOL newval = old;
- if (wParam) SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)|CLS_HIDEEMPTYGROUPS);
- else SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)&~CLS_HIDEEMPTYGROUPS);
- newval = ((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS) != 0);
+ BOOL old = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
+ if (wParam)
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
+ else
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) &~ CLS_HIDEEMPTYGROUPS);
+ BOOL newval = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
if (newval != old)
SendMessage(hwnd,CLM_AUTOREBUILD, 0, 0);
}
return 0;
case CLM_SETTEXTCOLOR:
- if (wParam < 0 || wParam>FONTID_MODERN_MAX) break;
+ if (wParam > FONTID_MODERN_MAX) break;
dat->fontModernInfo[wParam].colour = lParam;
dat->force_in_dialog = TRUE;
|