diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 21:02:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 21:02:26 +0000 |
commit | e48bae4c6ccf1003916b3960f30816ce8aaa955b (patch) | |
tree | a69a0e638db00a3f2af4581a6440178bb9893971 /protocols/JabberG/src | |
parent | 6cb654fab7272163d2330cf41de542e1ccba71c8 (diff) |
- additional operator LPARAM() for _A2T & _T2A;
- we don't need StrConvA anymore;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@13952 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_adhoc.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid_muc.cpp | 14 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_vcard.cpp | 12 |
3 files changed, 13 insertions, 15 deletions
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 378c610910..37160b7ad7 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -551,7 +551,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam) if (item == NULL || selected) {
CJabberAdhocStartupParams* pStartupParams = new CJabberAdhocStartupParams(this, jid, NULL);
- CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FORM), NULL, JabberAdHoc_CommandDlgProc, (LPARAM)(pStartupParams));
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FORM), NULL, JabberAdHoc_CommandDlgProc, (LPARAM)pStartupParams);
}
}
else if (lParam != 0)
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 8beb71694a..fde613418b 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -89,11 +89,9 @@ static void sttFillJidList(HWND hwndDlg) lvi.iSubItem = 0;
for (int i=0; i<count; i++) {
lvi.iItem = i;
- if (ListView_GetItem(hwndList, &lvi) == TRUE) {
- if (lvi.lParam!=(LPARAM)(-1) && lvi.lParam!=(LPARAM)(NULL)) {
+ if (ListView_GetItem(hwndList, &lvi) == TRUE)
+ if (lvi.lParam != -1 && lvi.lParam != NULL)
mir_free((void *) lvi.lParam);
- }
- }
}
ListView_DeleteAllItems(hwndList);
@@ -145,7 +143,7 @@ static void sttFillJidList(HWND hwndDlg) }
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
ListView_InsertItem(hwndList, &lvi);
SendMessage(hwndList, WM_SETREDRAW, TRUE, 0);
@@ -297,7 +295,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w ListView_GetSubItemRect(nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc);
if (nm->iSubItem == 1) {
HICON hIcon;
- if (nm->nmcd.lItemlParam == (LPARAM)(-1))
+ if (nm->nmcd.lItemlParam == -1)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
else
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
@@ -335,7 +333,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w lvi.pszText = text;
lvi.cchTextMax = SIZEOF(text);
ListView_GetItem(nm->hdr.hwndFrom, &lvi);
- if (lvi.lParam == (LPARAM)(-1)) {
+ if (lvi.lParam == -1) {
CMString szBuffer(dat->type2str());
if (!dat->ppro->EnterString(szBuffer, NULL, ESF_COMBO, "gcAddNick_"))
break;
@@ -397,7 +395,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w for (int i=0; i<count; i++) {
lvi.iItem = i;
if (ListView_GetItem(hwndList, &lvi) == TRUE) {
- if (lvi.lParam!=(LPARAM)(-1) && lvi.lParam!=(LPARAM)(NULL)) {
+ if (lvi.lParam != -1 && lvi.lParam != NULL) {
mir_free((void *) lvi.lParam);
}
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 9952d6e826..8350193384 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -743,7 +743,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP lvi.iItem++;
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
//phones
@@ -764,7 +764,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP lvi.iItem++;
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi);
}
break;
@@ -804,11 +804,11 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP HICON hIcon;
ListView_GetSubItemRect(nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc);
- if (nm->nmcd.lItemlParam == (LPARAM)(-1) && nm->iSubItem == 3)
+ if (nm->nmcd.lItemlParam == -1 && nm->iSubItem == 3)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
- else if (nm->iSubItem == 2 && nm->nmcd.lItemlParam != (LPARAM)(-1))
+ else if (nm->iSubItem == 2 && nm->nmcd.lItemlParam != -1)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_EDIT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
- else if (nm->iSubItem == 3 && nm->nmcd.lItemlParam != (LPARAM)(-1))
+ else if (nm->iSubItem == 3 && nm->nmcd.lItemlParam != -1)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
else break;
DrawIconEx(nm->nmcd.hdc, (rc.left + rc.right - GetSystemMetrics(SM_CXSMICON)) / 2, (rc.top + rc.bottom - GetSystemMetrics(SM_CYSMICON)) / 2, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
@@ -839,7 +839,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP lvi.iItem = hti.iItem;
lvi.iSubItem = 0;
ListView_GetItem(nm->hdr.hwndFrom, &lvi);
- if (lvi.lParam == (LPARAM)(-1)) {
+ if (lvi.lParam == -1) {
if (hti.iSubItem == 3) {
//add
EditDlgParam param = { -1, ppro };
|