diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 21:37:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 21:37:41 +0000 |
commit | ee68ac82d5aabb596e8bd0f2b9286827ca2ce545 (patch) | |
tree | 2b330d60da88d6c195ae1943ad93fe2b393469fd /src/modules | |
parent | 6aff7a968c46f4080a24bd372c6ec1337766adf7 (diff) |
these conversions aren't needed either
git-svn-id: http://svn.miranda-ng.org/main/trunk@8088 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/chat/clist.cpp | 8 | ||||
-rw-r--r-- | src/modules/clist/clc.cpp | 48 | ||||
-rw-r--r-- | src/modules/clist/clcmsgs.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clistevents.cpp | 10 | ||||
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clistmod.cpp | 8 | ||||
-rw-r--r-- | src/modules/clist/clistsettings.cpp | 10 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 10 | ||||
-rw-r--r-- | src/modules/clist/contact.cpp | 6 | ||||
-rw-r--r-- | src/modules/clist/movetogroup.cpp | 2 | ||||
-rw-r--r-- | src/modules/database/dbintf.cpp | 2 | ||||
-rw-r--r-- | src/modules/extraicons/DefaultExtraIcons.cpp | 6 | ||||
-rw-r--r-- | src/modules/extraicons/extraicons.cpp | 4 | ||||
-rw-r--r-- | src/modules/ignore/ignore.cpp | 10 | ||||
-rw-r--r-- | src/modules/protocols/protoaccs.cpp | 6 | ||||
-rw-r--r-- | src/modules/protocols/protochains.cpp | 10 | ||||
-rw-r--r-- | src/modules/protocols/protocols.cpp | 12 | ||||
-rw-r--r-- | src/modules/srmm/statusicon.cpp | 2 |
18 files changed, 80 insertions, 80 deletions
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index 5f47aa4c4b..1400bc8d07 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -103,7 +103,7 @@ BOOL SetAllOffline(BOOL bHide, const char *pszModule) int RoomDoubleclicked(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -141,7 +141,7 @@ INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam) INT_PTR JoinChat(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto) {
@@ -157,7 +157,7 @@ INT_PTR JoinChat(WPARAM wParam, LPARAM lParam) INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto)
@@ -168,7 +168,7 @@ INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam) int PrebuildContactMenu(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index b2f3bad3fb..1064255630 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -78,7 +78,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "MyHandle")) {
- cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry(wParam);
cli.pfnClcBroadcast(INTM_NAMECHANGED, wParam, lParam);
}
else if (!strcmp(cws->szSetting, "Group"))
@@ -93,7 +93,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) cli.pfnClcBroadcast(INTM_NAMEORDERCHANGED, 0, 0);
}
else {
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (szProto != NULL) {
if (!strcmp(cws->szModule, "Protocol") && !strcmp(cws->szSetting, "p"))
cli.pfnClcBroadcast(INTM_PROTOCHANGED, wParam, lParam);
@@ -443,13 +443,13 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, break;
case INTM_CONTACTADDED:
- cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
- cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
+ cli.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
+ cli.pfnNotifyNewContact(hwnd, wParam);
SortClcByTimer(hwnd);
break;
case INTM_CONTACTDELETED:
- cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ cli.pfnDeleteItemFromTree(hwnd, wParam);
SortClcByTimer(hwnd);
break;
@@ -461,10 +461,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (dbcws->value.type == DBVT_DELETED || dbcws->value.bVal == 0) {
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, NULL, NULL, NULL))
break;
- cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
- cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
+ cli.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
+ cli.pfnNotifyNewContact(hwnd, wParam);
}
- else cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ else cli.pfnDeleteItemFromTree(hwnd, wParam);
dat->needsResort = 1;
SortClcByTimer(hwnd);
@@ -481,10 +481,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage));
flags = contact->flags;
}
- cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) {
+ cli.pfnDeleteItemFromTree(hwnd, wParam);
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0)) {
NMCLISTCONTROL nm;
- cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
+ cli.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage));
if (flags & CONTACTF_CHECKED)
@@ -509,15 +509,15 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, MCONTACT hSelItem = NULL;
ClcContact *selcontact = NULL;
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (szProto == NULL)
status = ID_STATUS_OFFLINE;
else
- status = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ status = db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE);
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0))
+ shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0))
&& (!cli.pfnIsHiddenMode(dat, status) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);
contact = NULL;
@@ -526,12 +526,12 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
hSelItem = (MCONTACT)cli.pfnContactToHItem(selcontact);
- cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
+ cli.pfnAddContactToTree(hwnd, dat, wParam, (style & CLS_CONTACTLIST) == 0, 0);
recalcScrollBar = 1;
cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
if (contact) {
contact->iImage = (WORD) lParam;
- cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
+ cli.pfnNotifyNewContact(hwnd, wParam);
dat->needsResort = 1;
}
}
@@ -569,7 +569,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
+ lstrcpyn(contact->szText, cli.pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText));
dat->needsResort = 1;
SortClcByTimer(hwnd);
break;
@@ -578,9 +578,9 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- contact->proto = GetContactProto((MCONTACT)wParam);
- cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
- lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
+ contact->proto = GetContactProto(wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry(wParam);
+ lstrcpyn(contact->szText, cli.pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText));
SortClcByTimer(hwnd);
break;
@@ -604,11 +604,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case INTM_APPARENTMODECHANGED:
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (szProto == NULL)
break;
- WORD apparentMode = db_get_w((MCONTACT)wParam, szProto, "ApparentMode", 0);
+ WORD apparentMode = db_get_w(wParam, szProto, "ApparentMode", 0);
contact->flags &= ~(CONTACTF_INVISTO | CONTACTF_VISTO);
if (apparentMode == ID_STATUS_OFFLINE)
contact->flags |= CONTACTF_INVISTO;
@@ -626,11 +626,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case INTM_IDLECHANGED:
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (szProto == NULL)
break;
contact->flags &= ~CONTACTF_IDLE;
- if (db_get_dw((MCONTACT)wParam, szProto, "IdleTS", 0))
+ if (db_get_dw(wParam, szProto, "IdleTS", 0))
contact->flags |= CONTACTF_IDLE;
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp index 2f839b934d..3b4e038170 100644 --- a/src/modules/clist/clcmsgs.cpp +++ b/src/modules/clist/clcmsgs.cpp @@ -31,7 +31,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR {
switch (msg) {
case CLM_ADDCONTACT:
- cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 0);
+ cli.pfnAddContactToTree(hwnd, dat, wParam, 1, 0);
cli.pfnRecalcScrollBar(hwnd, dat);
cli.pfnSortCLC(hwnd, dat, 1);
break;
@@ -79,7 +79,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR break;
case CLM_DELETEITEM:
- cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ cli.pfnDeleteItemFromTree(hwnd, wParam);
cli.pfnSortCLC(hwnd, dat, 1);
cli.pfnRecalcScrollBar(hwnd, dat);
break;
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp index 6a99a46180..afea5bcfc7 100644 --- a/src/modules/clist/clistevents.cpp +++ b/src/modules/clist/clistevents.cpp @@ -370,8 +370,8 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM) for (; cli.events.count > 0;) {
for (hit = 0, j = 0; j < cli.events.count; j++) {
- if (cli.events.items[j]->cle.hContact == (MCONTACT)wParam) {
- cli.pfnRemoveEvent((MCONTACT)wParam, cli.events.items[j]->cle.hDbEvent);
+ if (cli.events.items[j]->cle.hContact == wParam) {
+ cli.pfnRemoveEvent(wParam, cli.events.items[j]->cle.hDbEvent);
hit = 1;
}
}
@@ -384,7 +384,7 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM) static int CListEventSettingsChanged(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL && cws && cws->szModule && cws->szSetting && strcmp(cws->szModule, "CList") == 0) {
if (strcmp(cws->szSetting, "DisableTrayFlash") == 0)
@@ -399,8 +399,8 @@ static int CListEventSettingsChanged(WPARAM wParam, LPARAM lParam) INT_PTR AddEventSyncStub(WPARAM wParam, LPARAM lParam) { return CallServiceSync(MS_CLIST_ADDEVENT"_SYNC", wParam, lParam); }
INT_PTR AddEventStub(WPARAM, LPARAM lParam) { return cli.pfnAddEvent((CLISTEVENT*)lParam) == NULL; }
-INT_PTR RemoveEventStub(WPARAM wParam, LPARAM lParam) { return cli.pfnRemoveEvent((MCONTACT)wParam, (HANDLE)lParam); }
-INT_PTR GetEventStub(WPARAM wParam, LPARAM lParam) { return (INT_PTR)cli.pfnGetEvent((MCONTACT)wParam, (int)lParam); }
+INT_PTR RemoveEventStub(WPARAM wParam, LPARAM lParam) { return cli.pfnRemoveEvent(wParam, (HANDLE)lParam); }
+INT_PTR GetEventStub(WPARAM wParam, LPARAM lParam) { return (INT_PTR)cli.pfnGetEvent(wParam, (int)lParam); }
int InitCListEvents(void)
{
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 1adf39e438..dd5b278f86 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -320,7 +320,7 @@ static INT_PTR AddContactMenuItem(WPARAM, LPARAM lParam) static INT_PTR BuildContactMenu(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
NotifyEventHooks(hPreBuildContactMenuEvent, (WPARAM)hContact, 0);
char *szProto = GetContactProto(hContact);
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index 28f011e93c..2f845d065e 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -185,7 +185,7 @@ int fnGetContactIcon(MCONTACT hContact) static INT_PTR GetContactIcon(WPARAM wParam, LPARAM)
{
- return cli.pfnGetContactIcon((MCONTACT)wParam);
+ return cli.pfnGetContactIcon(wParam);
}
static void AddProtoIconIndex(PROTOACCOUNT* pa)
@@ -245,7 +245,7 @@ static int ContactListAccountsChanged(WPARAM eventCode, LPARAM lParam) static INT_PTR ContactDoubleClicked(WPARAM wParam, LPARAM)
{
// Try to process event myself
- if (cli.pfnEventsProcessContactDoubleClick((MCONTACT)wParam) == 0)
+ if (cli.pfnEventsProcessContactDoubleClick(wParam) == 0)
return 0;
// Allow third-party plugins to process a dblclick
@@ -253,7 +253,7 @@ static INT_PTR ContactDoubleClicked(WPARAM wParam, LPARAM) return 0;
// Otherwise try to execute the default action
- TryProcessDoubleClick((MCONTACT)wParam);
+ TryProcessDoubleClick(wParam);
return 0;
}
@@ -425,7 +425,7 @@ extern int sortByStatus, sortByProto; static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
{
- MCONTACT a = (MCONTACT)wParam, b = (MCONTACT)lParam;
+ MCONTACT a = wParam, b = lParam;
TCHAR namea[128], *nameb;
int statusa, statusb;
char *szProto1, *szProto2;
diff --git a/src/modules/clist/clistsettings.cpp b/src/modules/clist/clistsettings.cpp index 90930e092a..81dc9c3008 100644 --- a/src/modules/clist/clistsettings.cpp +++ b/src/modules/clist/clistsettings.cpp @@ -160,7 +160,7 @@ INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam) {
static char retVal[200];
ClcCacheEntry *cacheEntry = NULL;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (lParam & GCDNF_UNICODE)
return (INT_PTR)cli.pfnGetContactDisplayName(hContact, lParam & ~GCDNF_UNICODE);
@@ -209,13 +209,13 @@ INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam) INT_PTR InvalidateDisplayName(WPARAM wParam, LPARAM)
{
- cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry(wParam);
return 0;
}
int ContactAdded(WPARAM wParam, LPARAM)
{
- cli.pfnChangeContactIcon((MCONTACT)wParam, cli.pfnIconFromStatusMode(GetContactProto((MCONTACT)wParam), ID_STATUS_OFFLINE, NULL), 1);
+ cli.pfnChangeContactIcon(wParam, cli.pfnIconFromStatusMode(GetContactProto(wParam), ID_STATUS_OFFLINE, NULL), 1);
cli.pfnSortContacts();
return 0;
}
@@ -230,7 +230,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
DBVARIANT dbv;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
// Early exit
if (hContact == NULL)
@@ -270,7 +270,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "Hidden")) {
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1);
}
else
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index a5d760cfad..4242f183c8 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -134,7 +134,7 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP TCHAR szFinal[256];
GetDlgItemText(hWnd, IDC_TOPLINE, szFormat, SIZEOF(szFormat));
- mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName((MCONTACT)lParam, 0));
+ mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName(lParam, 0));
SetDlgItemText(hWnd, IDC_TOPLINE, szFinal);
}
SetFocus( GetDlgItem(hWnd, IDNO));
@@ -185,7 +185,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) // Delete contact
case IDYES:
{
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (szProto != NULL) {
// Check if protocol uses server side lists
DWORD caps;
@@ -197,7 +197,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) status = CallProtoServiceInt(NULL,szProto, PS_GETSTATUS, 0, 0);
if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
// Set a flag so we remember to delete the contact when the protocol goes online the next time
- db_set_b((MCONTACT)wParam, "CList", "Delete", 1);
+ db_set_b(wParam, "CList", "Delete", 1);
MessageBox(NULL,
TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
TranslateT("Delete contact"), MB_ICONINFORMATION | MB_OK);
@@ -212,7 +212,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) // Archive contact
case IDC_HIDE:
- db_set_b((MCONTACT)wParam, "CList", "Hidden", 1);
+ db_set_b(wParam, "CList", "Hidden", 1);
break;
}
@@ -222,7 +222,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) static INT_PTR MenuItem_AddContactToList(WPARAM wParam, LPARAM)
{
ADDCONTACTSTRUCT acs = { 0 };
- acs.hContact = (MCONTACT)wParam;
+ acs.hContact = wParam;
acs.handleType = HANDLE_CONTACT;
acs.szProto = "";
CallService(MS_ADDCONTACT_SHOW, NULL, (LPARAM)&acs);
diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp index be856535aa..7931c1d7d1 100644 --- a/src/modules/clist/contact.cpp +++ b/src/modules/clist/contact.cpp @@ -144,13 +144,13 @@ INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam) CallService(MS_CLUI_CONTACTDELETED, wParam, 0);
if ((HANDLE) lParam == NULL)
- db_unset((MCONTACT)wParam, "CList", "Group");
+ db_unset(wParam, "CList", "Group");
else {
grpChg.pszNewName = cli.pfnGetGroupName(lParam, NULL);
- db_set_ts((MCONTACT)wParam, "CList", "Group", grpChg.pszNewName);
+ db_set_ts(wParam, "CList", "Group", grpChg.pszNewName);
}
CallService(MS_CLUI_CONTACTADDED, wParam,
- cli.pfnIconFromStatusMode(GetContactProto((MCONTACT)wParam), GetContactStatus((MCONTACT)wParam), (MCONTACT)wParam));
+ cli.pfnIconFromStatusMode(GetContactProto(wParam), GetContactStatus(wParam), wParam));
NotifyEventHooks(hGroupChangeEvent, wParam, (LPARAM)&grpChg);
return 0;
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp index 3193dc6a20..2680c7e218 100644 --- a/src/modules/clist/movetogroup.cpp +++ b/src/modules/clist/movetogroup.cpp @@ -101,7 +101,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)lphGroupsItems[i], 0);
lphGroupsItems.destroy();
- ptrT szContactGroup(db_get_tsa((MCONTACT)wParam, "CList", "Group"));
+ ptrT szContactGroup(db_get_tsa(wParam, "CList", "Group"));
int pos = 1000;
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp index 46719debed..322355f2c4 100644 --- a/src/modules/database/dbintf.cpp +++ b/src/modules/database/dbintf.cpp @@ -48,7 +48,7 @@ static INT_PTR srvGetContactCount(WPARAM, LPARAM) static INT_PTR srvDeleteContact(WPARAM wParam, LPARAM)
{
DBVARIANT dbv = {0};
- if (!db_get_ts((MCONTACT)wParam, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ts(wParam, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/src/modules/extraicons/DefaultExtraIcons.cpp b/src/modules/extraicons/DefaultExtraIcons.cpp index 7b03c16c96..a47ce5e7a9 100644 --- a/src/modules/extraicons/DefaultExtraIcons.cpp +++ b/src/modules/extraicons/DefaultExtraIcons.cpp @@ -161,7 +161,7 @@ static void SetExtraIcons(MCONTACT hContact) static int SettingChanged(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -209,7 +209,7 @@ static int DefaultOnClick(WPARAM wParam, LPARAM lParam, LPARAM param) if (p == NULL)
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -279,7 +279,7 @@ static ProtoInfo* FindProto(const char *proto) static int ProtocolApplyIcon(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char *proto = GetContactProto(hContact);
if (IsEmpty(proto))
return 0;
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index 8cb0acadac..7fae900021 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -248,7 +248,7 @@ int ClistExtraListRebuild(WPARAM wParam, LPARAM lParam) int ClistExtraImageApply(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -262,7 +262,7 @@ int ClistExtraImageApply(WPARAM wParam, LPARAM lParam) int ClistExtraClick(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp index f50384ae6a..75f79fbd57 100644 --- a/src/modules/ignore/ignore.cpp +++ b/src/modules/ignore/ignore.cpp @@ -338,7 +338,7 @@ static int IgnoreOptInitialise(WPARAM wParam, LPARAM) static INT_PTR IsIgnored(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((MCONTACT)wParam);
+ DWORD mask = GetMask(wParam);
if (lParam < 1 || lParam > IGNOREEVENT_MAX)
return 1;
return (mask >> (lParam-1))&1;
@@ -346,20 +346,20 @@ static INT_PTR IsIgnored(WPARAM wParam, LPARAM lParam) static INT_PTR Ignore(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((MCONTACT)wParam);
+ DWORD mask = GetMask(wParam);
if ((lParam < 1 || lParam > IGNOREEVENT_MAX) && lParam != IGNOREEVENT_ALL)
return 1;
if (lParam == IGNOREEVENT_ALL)
mask = (1 << IGNOREEVENT_MAX)-1;
else
mask |= 1 << (lParam-1);
- db_set_dw((MCONTACT)wParam, "Ignore", "Mask1", mask);
+ db_set_dw(wParam, "Ignore", "Mask1", mask);
return 0;
}
static INT_PTR Unignore(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((MCONTACT)wParam);
+ DWORD mask = GetMask(wParam);
if ((lParam < 1 || lParam > IGNOREEVENT_MAX) && lParam != IGNOREEVENT_ALL)
return 1;
@@ -367,7 +367,7 @@ static INT_PTR Unignore(WPARAM wParam, LPARAM lParam) mask = 0;
else
mask &= ~(1 << (lParam-1));
- db_set_dw((MCONTACT)wParam, "Ignore", "Mask1", mask);
+ db_set_dw(wParam, "Ignore", "Mask1", mask);
return 0;
}
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 2a0e2c4699..94a96366e4 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -199,7 +199,7 @@ void WriteDbAccounts() /////////////////////////////////////////////////////////////////////////////////////////
static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
@@ -210,7 +210,7 @@ static int OnContactDeleted(WPARAM wParam, LPARAM lParam) static int OnDbSettingsChanged(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
@@ -317,7 +317,7 @@ static INT_PTR stub11(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam) static INT_PTR stub12(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
{
- return (INT_PTR)ppi->GetCaps(wParam, (MCONTACT)lParam);
+ return (INT_PTR)ppi->GetCaps(wParam, lParam);
}
static INT_PTR stub13(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM)
diff --git a/src/modules/protocols/protochains.cpp b/src/modules/protocols/protochains.cpp index bf13ecd7d1..16bf1cb4db 100644 --- a/src/modules/protocols/protochains.cpp +++ b/src/modules/protocols/protochains.cpp @@ -175,13 +175,13 @@ PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact) static INT_PTR Proto_GetContactBaseProto(WPARAM wParam, LPARAM)
{
- PROTOACCOUNT *pa = Proto_GetAccount((MCONTACT)wParam);
+ PROTOACCOUNT *pa = Proto_GetAccount(wParam);
return (INT_PTR)(Proto_IsAccountEnabled(pa) ? pa->szModuleName : NULL);
}
static INT_PTR Proto_GetContactBaseAccount(WPARAM wParam, LPARAM)
{
- PROTOACCOUNT *pa = Proto_GetAccount((MCONTACT)wParam);
+ PROTOACCOUNT *pa = Proto_GetAccount(wParam);
return (INT_PTR)(pa ? pa->szModuleName : NULL);
}
@@ -210,14 +210,14 @@ static INT_PTR Proto_AddToContact(WPARAM wParam, LPARAM lParam) if (pd == NULL) {
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (pa) {
- db_set_s((MCONTACT)wParam, "Protocol", "p", szProto);
+ db_set_s(wParam, "Protocol", "p", szProto);
return 0;
}
return 1;
}
if (pd->type == PROTOTYPE_PROTOCOL || pd->type == PROTOTYPE_VIRTUAL)
- db_set_s((MCONTACT)wParam, "Protocol", "p", szProto);
+ db_set_s(wParam, "Protocol", "p", szProto);
return 0;
}
@@ -228,7 +228,7 @@ static INT_PTR Proto_RemoveFromContact(WPARAM wParam, LPARAM lParam) case 0:
return 1;
case -1:
- db_unset((MCONTACT)wParam, "Protocol", "p");
+ db_unset(wParam, "Protocol", "p");
}
return 0;
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index 03ff01a69c..dfbbd9950f 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -214,11 +214,11 @@ static int Proto_ValidTypingContact(MCONTACT hContact, char *szProto) static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam)
{
if (lParam == PROTOTYPE_SELFTYPING_OFF || lParam == PROTOTYPE_SELFTYPING_ON) {
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (!szProto)
return 0;
- if (Proto_ValidTypingContact((MCONTACT)wParam, szProto))
+ if (Proto_ValidTypingContact(wParam, szProto))
CallProtoServiceInt(NULL,szProto, PSS_USERISTYPING, wParam, lParam);
}
@@ -228,7 +228,7 @@ static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam) static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam)
{
int type = (int)lParam;
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (!szProto)
return 0;
@@ -238,7 +238,7 @@ static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam) if (type < PROTOTYPE_CONTACTTYPING_OFF)
return 0;
- if (Proto_ValidTypingContact((MCONTACT)wParam, szProto))
+ if (Proto_ValidTypingContact(wParam, szProto))
NotifyEventHooks(hTypeEvent, wParam, lParam);
return 0;
@@ -442,7 +442,7 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char else
return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const PROTOCHAR**)&pfr->szFilename);
}
- case 12: return (INT_PTR)ppi->GetCaps(wParam, (MCONTACT)lParam);
+ case 12: return (INT_PTR)ppi->GetCaps(wParam, lParam);
case 13: return (INT_PTR)Proto_GetIcon(ppi, wParam);
case 14: return (INT_PTR)ppi->GetInfo(hContact, wParam);
case 15:
@@ -490,7 +490,7 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char return (INT_PTR)ppi->SetAwayMsg(wParam, StrConvT((char*)lParam));
else
return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
- case 34: return (INT_PTR)ppi->UserIsTyping((MCONTACT)wParam, lParam);
+ case 34: return (INT_PTR)ppi->UserIsTyping(wParam, lParam);
case 35: lstrcpynA((char*)lParam, ppi->m_szModuleName, wParam); return 0;
case 36: return ppi->m_iStatus;
diff --git a/src/modules/srmm/statusicon.cpp b/src/modules/srmm/statusicon.cpp index e1cc7bc0f0..677bcfa068 100644 --- a/src/modules/srmm/statusicon.cpp +++ b/src/modules/srmm/statusicon.cpp @@ -88,7 +88,7 @@ INT_PTR ModifyStatusIcon(WPARAM wParam, LPARAM lParam) if (p == NULL)
return 1;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL) {
mir_free(p->sid.szModule);
mir_free(p->sid.szTooltip);
|