From ee68ac82d5aabb596e8bd0f2b9286827ca2ce545 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 21:37:41 +0000 Subject: these conversions aren't needed either git-svn-id: http://svn.miranda-ng.org/main/trunk@8088 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdmsg/src/globals.cpp | 4 ++-- src/core/stdmsg/src/msgdialog.cpp | 2 +- src/core/stdmsg/src/msgs.cpp | 30 +++++++++++++++--------------- src/core/stdmsg/src/statusicon.cpp | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp index 71af89163b..fb90ce71ff 100644 --- a/src/core/stdmsg/src/globals.cpp +++ b/src/core/stdmsg/src/globals.cpp @@ -121,7 +121,7 @@ void ReloadGlobals() static int dbaddedevent(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact) { HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact); if (h) @@ -144,7 +144,7 @@ static int ackevent(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact); if (h) SendMessage(h, HM_AVATARACK, wParam, lParam); return 0; diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 23a16cc783..7c84d5239e 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1308,7 +1308,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break; case HM_DBEVENTADDED: - if ((MCONTACT)wParam == dat->hContact) { + if (wParam == dat->hContact) { HANDLE hDbEvent = (HANDLE)lParam; if (dat->hDbEventFirst == NULL) dat->hDbEventFirst = hDbEvent; diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index c448ec70f5..83312cb914 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -59,7 +59,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1); /* does a window for the contact exist? */ - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd) { if (!db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS)) { ShowWindow(hwnd, SW_RESTORE); @@ -78,10 +78,10 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) /* new message */ SkinPlaySound("AlertMsg"); - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; newData.noActivate = db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS); CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM)&newData); return 0; @@ -89,12 +89,12 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) TCHAR toolTip[256], *contactName; CLISTEVENT cle = { sizeof(cle) }; - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)lParam; cle.flags = CLEF_TCHAR; cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); cle.pszService = "SRMsg/ReadMessage"; - contactName = pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0); + contactName = pcli->pfnGetContactDisplayName(wParam, 0); mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName); cle.ptszTooltip = toolTip; CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle); @@ -135,12 +135,12 @@ INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar) static INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) { - return SendMessageCmd((MCONTACT)wParam, (char*)lParam, TRUE); + return SendMessageCmd(wParam, (char*)lParam, TRUE); } static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) { - return SendMessageCmd((MCONTACT)wParam, (char*)lParam, FALSE); + return SendMessageCmd(wParam, (char*)lParam, FALSE); } static INT_PTR ReadMessageCommand(WPARAM wParam, LPARAM lParam) @@ -159,12 +159,12 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) SkinPlaySound((lParam) ? "TNStart" : "TNStop"); - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd) SendMessage(hwnd, DM_TYPING, 0, lParam); else if (lParam && (g_dat.flags & SMF_SHOWTYPINGTRAY)) { TCHAR szTip[256]; - mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0)); + mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(wParam, 0)); if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags&SMF_SHOWTYPINGCLIST)) { MIRANDASYSTRAYNOTIFY tn = { sizeof(tn) }; @@ -177,7 +177,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) } else { CLISTEVENT cle = { sizeof(cle) }; - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)1; cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR; cle.hIcon = LoadSkinnedIcon( SKINICON_OTHER_TYPING ); @@ -194,7 +194,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (cws->szModule == NULL) return 0; @@ -204,7 +204,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) if (cws->szSetting && !strcmp(cws->szSetting, "Timezone")) WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM) cws, 0); else { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto && !strcmp(cws->szModule, szProto)) WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0); } @@ -215,7 +215,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) static int ContactDeleted(WPARAM wParam, LPARAM lParam) { HWND hwnd; - if (hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam)) + if (hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam)) SendMessage(hwnd, WM_CLOSE, 0, 0); return 0; @@ -315,7 +315,7 @@ static int IconsChanged(WPARAM, LPARAM) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact) { bool bEnabled = false; char *szProto = GetContactProto(hContact); @@ -346,7 +346,7 @@ static INT_PTR GetWindowClass(WPARAM wParam, LPARAM lParam) static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) { - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd == NULL) return 1; diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp index e969085c22..bd813201cf 100644 --- a/src/core/stdmsg/src/statusicon.cpp +++ b/src/core/stdmsg/src/statusicon.cpp @@ -26,7 +26,7 @@ HANDLE hHookIconPressedEvt; static int OnSrmmIconChanged(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) WindowList_Broadcast(g_dat.hMessageWindowList, DM_STATUSICONCHANGE, 0, 0); else { -- cgit v1.2.3