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 ++++++++------------------ protocols/MSN/src/msn_svcs.cpp | 17 +++++------------ 2 files changed, 13 insertions(+), 30 deletions(-) (limited to 'protocols/MSN/src') 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; diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index ec1c2f97b8..9d1be8b0a5 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -242,12 +242,10 @@ INT_PTR CMsnProto::SetNickName(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // MsnSendNudge - Sending a nudge -INT_PTR CMsnProto::SendNudge(WPARAM wParam, LPARAM lParam) +INT_PTR CMsnProto::SendNudge(WPARAM hContact, LPARAM lParam) { if (!msnLoggedIn) return 0; - MCONTACT hContact = wParam; - char tEmail[MSN_MAX_EMAIL_LEN]; if (MSN_IsMeByContact(hContact, tEmail)) return 0; @@ -378,10 +376,8 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // MsnContactDeleted - called when a contact is deleted from list -int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) +int CMsnProto::OnContactDeleted(WPARAM hContact, LPARAM lParam) { - const MCONTACT hContact = wParam; - if (!msnLoggedIn) //should never happen for MSN contacts return 0; @@ -420,11 +416,10 @@ int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) } -int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam) +int CMsnProto::OnGroupChange(WPARAM hContact, LPARAM lParam) { if (!msnLoggedIn || !MyOptions.ManageServer) return 0; - const MCONTACT hContact = wParam; const CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam; if (hContact == NULL) @@ -456,9 +451,8 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // MsnDbSettingChanged - look for contact's settings changes -int CMsnProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam) +int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam; if (!msnLoggedIn) @@ -617,9 +611,8 @@ INT_PTR CMsnProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // OnLeaveChat - closes MSN chat window -INT_PTR CMsnProto::OnLeaveChat(WPARAM wParam,LPARAM lParam) +INT_PTR CMsnProto::OnLeaveChat(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; if (isChatRoom(hContact) != 0) { DBVARIANT dbv; if (getTString(hContact, "ChatRoomID", &dbv) == 0) { -- cgit v1.2.3