From 1925d3521846f4e6683d3d537cc41de9c9bd7250 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Feb 2014 19:01:03 +0000 Subject: "we don't need these variables" (c) Pink Floyd git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn_menu.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'protocols/MSN/src/msn_menu.cpp') diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 723af931a5..c4abdbdcaa 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -30,11 +30,9 @@ HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile; ///////////////////////////////////////////////////////////////////////////////////////// // Block command callback function -INT_PTR CMsnProto::MsnBlockCommand(WPARAM wParam, LPARAM) +INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM) { if (msnLoggedIn) { - MCONTACT hContact = wParam; - char tEmail[MSN_MAX_EMAIL_LEN]; db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail)); @@ -58,11 +56,9 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM) return 0; } -INT_PTR CMsnProto::MsnSendHotmail(WPARAM wParam, LPARAM) +INT_PTR CMsnProto::MsnSendHotmail(WPARAM hContact, LPARAM) { - MCONTACT hContact = wParam; char szEmail[MSN_MAX_EMAIL_LEN]; - if (MSN_IsMeByContact(hContact, szEmail)) MsnGotoInbox(0, 0); else if (msnLoggedIn) @@ -83,15 +79,13 @@ INT_PTR CMsnProto::MsnSetupAlerts(WPARAM, LPARAM) ///////////////////////////////////////////////////////////////////////////////////////// // MsnViewProfile - view a contact's profile -INT_PTR CMsnProto::MsnViewProfile(WPARAM wParam, LPARAM) +INT_PTR CMsnProto::MsnViewProfile(WPARAM hContact, LPARAM) { - MCONTACT hContact = wParam; char buf[64], *cid; if (hContact == NULL) cid = mycid; - else - { + else { cid = buf; if (db_get_static(hContact, m_szModuleName, "CID", buf, 30)) return 0; @@ -125,14 +119,12 @@ INT_PTR CMsnProto::MsnInviteCommand(WPARAM, LPARAM) ///////////////////////////////////////////////////////////////////////////////////////// // MsnRebuildContactMenu - gray or ungray the block menus according to contact's status -int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) +int CMsnProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) { - MCONTACT hContact = wParam; - char szEmail[MSN_MAX_EMAIL_LEN]; - if ( !MSN_IsMyContact(hContact)) return 0; + char szEmail[MSN_MAX_EMAIL_LEN]; bool isMe = MSN_IsMeByContact(hContact, szEmail); if (szEmail[0]) { int listId = Lists_GetMask(szEmail); @@ -155,12 +147,10 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) return 0; } -int CMsnProto::OnContactDoubleClicked(WPARAM wParam, LPARAM) +int CMsnProto::OnContactDoubleClicked(WPARAM hContact, LPARAM) { - MCONTACT hContact = wParam; - if (emailEnabled && MSN_IsMeByContact(hContact)) { - MsnSendHotmail(wParam, 0); + MsnSendHotmail(hContact, 0); return 1; } return 0; -- cgit v1.2.3