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 --- src/modules/clist/clistsettings.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/modules/clist/clistsettings.cpp') diff --git a/src/modules/clist/clistsettings.cpp b/src/modules/clist/clistsettings.cpp index 81dc9c3008..196daf1b51 100644 --- a/src/modules/clist/clistsettings.cpp +++ b/src/modules/clist/clistsettings.cpp @@ -156,11 +156,10 @@ TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode) return (cacheEntry == NULL) ? mir_tstrdup(buffer) : buffer; } -INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam) +INT_PTR GetContactDisplayName(WPARAM hContact, LPARAM lParam) { static char retVal[200]; ClcCacheEntry *cacheEntry = NULL; - MCONTACT hContact = wParam; if (lParam & GCDNF_UNICODE) return (INT_PTR)cli.pfnGetContactDisplayName(hContact, lParam & ~GCDNF_UNICODE); @@ -226,11 +225,10 @@ int ContactDeleted(WPARAM wParam, LPARAM) return 0; } -int ContactSettingChanged(WPARAM wParam, LPARAM lParam) +int ContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; DBVARIANT dbv; - MCONTACT hContact = wParam; // Early exit if (hContact == NULL) @@ -242,7 +240,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) cli.pfnInvalidateDisplayNameCacheEntry(hContact); if (!strcmp(cws->szSetting, "UIN") || !strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName") || !strcmp(cws->szSetting, "LastName") || !strcmp(cws->szSetting, "e-mail")) { - CallService(MS_CLUI_CONTACTRENAMED, wParam, 0); + CallService(MS_CLUI_CONTACTRENAMED, hContact, 0); } else if (!strcmp(cws->szSetting, "Status")) { if (!db_get_b(hContact, "CList", "Hidden", 0)) { @@ -250,7 +248,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) // User's state is changing, and we are hideOffline-ing if (cws->value.wVal == ID_STATUS_OFFLINE) { cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); - CallService(MS_CLUI_CONTACTDELETED, wParam, 0); + CallService(MS_CLUI_CONTACTDELETED, hContact, 0); mir_free(dbv.pszVal); return 0; } @@ -270,11 +268,11 @@ 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(wParam); + char *szProto = GetContactProto(hContact); cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1); } else - CallService(MS_CLUI_CONTACTDELETED, wParam, 0); + CallService(MS_CLUI_CONTACTDELETED, hContact, 0); } if (!strcmp(cws->szSetting, "MyHandle")) cli.pfnInvalidateDisplayNameCacheEntry(hContact); -- cgit v1.2.3