From 2236e9a252983edcce561223534041629935d750 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 Nov 2013 21:50:44 +0000 Subject: various code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/button/button.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/button/button.cpp b/src/modules/button/button.cpp index c99048f3db..2f6c2f4a01 100644 --- a/src/modules/button/button.cpp +++ b/src/modules/button/button.cpp @@ -283,12 +283,12 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR SendMessage(bct->hwndToolTips, TTM_DELTOOL, 0, (LPARAM)&ti); if (SendMessage(bct->hwndToolTips, TTM_GETTOOLCOUNT, 0, (LPARAM)&ti) == 0) { - int idx; TTooltips tt; tt.ThreadId = GetCurrentThreadId(); mir_cslock lck(csTips); - if ((idx = lToolTips.getIndex(&tt)) != -1) { + int idx = lToolTips.getIndex(&tt); + if (idx != -1) { mir_free(lToolTips[idx]); lToolTips.remove(idx); DestroyWindow(bct->hwndToolTips); @@ -462,14 +462,13 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case BUTTONADDTOOLTIP: if (wParam) { - TOOLINFO ti = {0}; if ( !bct->hwndToolTips) { - int idx; TTooltips tt; tt.ThreadId = GetCurrentThreadId(); mir_cslock lck(csTips); - if ((idx = lToolTips.getIndex(&tt)) != -1) + int idx = lToolTips.getIndex(&tt); + if (idx != -1) bct->hwndToolTips = lToolTips[idx]->hwnd; else { TTooltips *ptt = (TTooltips*)mir_alloc(sizeof(TTooltips)); @@ -479,6 +478,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR bct->hwndToolTips = ptt->hwnd; } } + TOOLINFO ti = {0}; ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND; ti.hwnd = bct->hwnd; -- cgit v1.2.3