From 9374c8e701dcb61a46c89a854235d91a23bf672e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jul 2019 20:02:16 +0300 Subject: warning fixes --- plugins/Clist_modern/src/modern_clc.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index ad2fe35a51..e59f10c3fe 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -284,9 +284,9 @@ static bool clcItemNotHiddenOffline(ClcGroup *group, ClcContact *contact) return false; } -static LRESULT clcOnCreate(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +static LRESULT clcOnCreate(ClcData*, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - dat = new ClcData(); + ClcData *dat = new ClcData(); SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat); dat->hCheckBoxTheme = xpt_AddThemeHandle(hwnd, L"BUTTON"); dat->m_paintCouter = 0; @@ -551,25 +551,27 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM dat->selection = cliGetRowsPriorTo(&dat->list, group, -1); selMoved = 1; } - else { - if (contact->type == CLCIT_GROUP) { - if (changeGroupExpand == 1) { - if (!contact->group->expanded) { - dat->selection--; - selMoved = 1; - } - else g_clistApi.pfnSetGroupExpand(hwnd, dat, contact->group, 0); - } - else if (changeGroupExpand == 2) { - g_clistApi.pfnSetGroupExpand(hwnd, dat, contact->group, 1); - dat->selection++; + else if (contact->type == CLCIT_GROUP) { + if (changeGroupExpand == 1) { + if (!contact->group->expanded) { + dat->selection--; selMoved = 1; } - else { SetCapture(hwnd); return 0; } + else g_clistApi.pfnSetGroupExpand(hwnd, dat, contact->group, 0); + } + else if (changeGroupExpand == 2) { + g_clistApi.pfnSetGroupExpand(hwnd, dat, contact->group, 1); + dat->selection++; + selMoved = 1; + } + else { + SetCapture(hwnd); + return 0; } } } } + if (selMoved) { if (dat->selection >= g_clistApi.pfnGetGroupContentsCount(&dat->list, 1)) dat->selection = g_clistApi.pfnGetGroupContentsCount(&dat->list, 1) - 1; -- cgit v1.2.3