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 --- plugins/Scriver/src/msgdialog.cpp | 6 +++--- plugins/Scriver/src/msgs.cpp | 40 +++++++++++++++++++------------------- plugins/Scriver/src/msgwindow.cpp | 2 +- plugins/Scriver/src/statusicon.cpp | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 2c7755f21c..6584212f9f 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1093,7 +1093,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break; case DM_CLISTSETTINGSCHANGED: - if ((MCONTACT)wParam == dat->windowData.hContact) { + if (wParam == dat->windowData.hContact) { if (dat->windowData.hContact && dat->szProto) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; char idbuf[128]; @@ -1353,7 +1353,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_REMAKELOG: dat->lastEventType = -1; - if (wParam == 0 || (MCONTACT)wParam == dat->windowData.hContact) + if (wParam == 0 || wParam == dat->windowData.hContact) StreamInEvents(hwndDlg, dat->hDbEventFirst, -1, 0); InvalidateRect(GetDlgItem(hwndDlg, IDC_LOG), NULL, FALSE); @@ -1390,7 +1390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break; case HM_DBEVENTADDED: - if ((MCONTACT)wParam == dat->windowData.hContact) { + if (wParam == dat->windowData.hContact) { HANDLE hDbEvent = (HANDLE)lParam; DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get(hDbEvent, &dbei); diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index ffc1f0c14a..fb812e2589 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -96,7 +96,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ)) return 0; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd) SendMessage(hwnd, HM_DBEVENTADDED, wParam, lParam); @@ -108,9 +108,9 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) if (hwnd == NULL) { /* new message */ SkinPlaySound("AlertMsg"); - if (IsAutoPopup((MCONTACT)wParam)) { + if (IsAutoPopup(wParam)) { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; HWND hParent = GetParentWindow(newData.hContact, FALSE); newData.flags = NMWLP_INCOMING; CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)&newData); @@ -123,7 +123,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) CLISTEVENT cle = { sizeof(cle) }; cle.flags = CLEF_TCHAR; - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)lParam; cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); cle.pszService = "SRMsg/ReadMessage"; @@ -137,14 +137,14 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) { /* does the MCONTACT's protocol support IM messages? */ - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto == NULL) return 1; /* unknown contact */ if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) return 1; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd != NULL) { if (lParam) { HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE); @@ -155,7 +155,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) } else { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; newData.szInitialText = (const char *) lParam; newData.isWchar = 1; HWND hParent = GetParentWindow(newData.hContact, FALSE); @@ -166,7 +166,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); //logInfo("Show message window for: %s (%s)", CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, 0), szProto); if (szProto) { /* does the MCONTACT's protocol support IM messages? */ @@ -176,7 +176,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) else /* unknown contact */ return 1; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd != NULL) { if (lParam) { HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE); @@ -187,7 +187,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) } else { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; newData.szInitialText = (const char *)lParam; HWND hParent = GetParentWindow(newData.hContact, FALSE); CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)& newData); @@ -210,7 +210,7 @@ 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.flags2 & SMF2_SHOWTYPINGTRAY)) { @@ -231,7 +231,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) CLISTEVENT cle = {0}; cle.cbSize = sizeof(cle); - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)1; cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR; cle.hIcon = GetCachedIcon("scriver_TYPING"); @@ -247,7 +247,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto))) return 0; WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, wParam, lParam); @@ -257,7 +257,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; } @@ -338,9 +338,9 @@ static INT_PTR GetWindowData(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) - hwnd = SM_FindWindowByContact((MCONTACT)wParam); + hwnd = SM_FindWindowByContact(wParam); if (hwnd == NULL) return 1; @@ -354,7 +354,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == 0) return 0; @@ -376,7 +376,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) if (wParam == 0) // protocol picture has changed... WindowList_Broadcast(g_dat.hMessageWindowList, DM_AVATARCHANGED, wParam, lParam); else { - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); SendMessage(hwnd, DM_AVATARCHANGED, wParam, lParam); } return 0; @@ -407,9 +407,9 @@ void ChangeStatusIcons() int StatusIconPressed(WPARAM wParam, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *) lParam; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd == NULL) - hwnd = SM_FindWindowByContact((MCONTACT)wParam); + hwnd = SM_FindWindowByContact(wParam); if (hwnd != NULL) { if (!strcmp(SRMMMOD, sicd->szModule)) { diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index e079d7e7af..f51ea244eb 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -1207,7 +1207,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return TRUE; case CM_ADDCHILD: - AddChild(dat, (HWND)wParam, (MCONTACT)lParam); + AddChild(dat, (HWND)wParam, lParam); return TRUE; case CM_ACTIVATECHILD: diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp index 65af9ce66e..dd370470e7 100644 --- a/plugins/Scriver/src/statusicon.cpp +++ b/plugins/Scriver/src/statusicon.cpp @@ -61,7 +61,7 @@ void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, in static int OnSrmmIconChanged(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) WindowList_Broadcast(g_dat.hParentWindowList, DM_STATUSICONCHANGE, 0, 0); else { -- cgit v1.2.3