From 5ac26cff397836222eb8d51d866890f96321c601 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Sun, 25 Apr 2010 15:57:51 +0000 Subject: Optimizations, removed redundant code, better compatibility with popup+ git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@512 4f64403b-2f21-0410-a795-97e2b3489a10 --- yapp/message_pump.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'yapp/message_pump.cpp') diff --git a/yapp/message_pump.cpp b/yapp/message_pump.cpp index a03dae3..c2483d3 100644 --- a/yapp/message_pump.cpp +++ b/yapp/message_pump.cpp @@ -97,9 +97,11 @@ DWORD CALLBACK MessagePumpThread(LPVOID param) { if(hwndMsg.wParam) // set notifyer handle SendMessage(hwnd, PUM_SETNOTIFYH, hwndMsg.wParam, 0); } else { - if(pd && pd->pwzTitle) free(pd->pwzTitle); - if(pd && pd->pwzText) free(pd->pwzText); - if(pd) free(pd); + if (pd) { + mir_free(pd->pwzTitle); + mir_free(pd->pwzText); + mir_free(pd); + } } } break; @@ -134,7 +136,7 @@ DWORD CALLBACK MessagePumpThread(LPVOID param) { DispatchMessage(&hwndMsg); // do this here in case the window has gone if(hwndMsg.message == PUM_CHANGE || hwndMsg.message == PUM_SETTEXT) - free((void *)hwndMsg.lParam); + mir_free((void *)hwndMsg.lParam); } break; } @@ -166,7 +168,6 @@ void FindWindow(PopupData *pd, HANDLE hEvent, HWND *hwnd); void InitMessagePump() { WNDCLASS popup_win_class = {0}; - popup_win_class.style = 0; popup_win_class.lpfnWndProc = PopupWindowProc; popup_win_class.hInstance = hInst; popup_win_class.lpszClassName = POP_WIN_CLASS; -- cgit v1.2.3