summaryrefslogtreecommitdiff
path: root/plugins/AddContactPlus/src/addcontact.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/AddContactPlus/src/addcontact.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/AddContactPlus/src/addcontact.cpp')
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index e1d0a79bd0..f77bd1f5de 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -100,7 +100,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs)
}
if (iAccCount == 0) {
- if (GetParent(hdlg) == NULL)
+ if (GetParent(hdlg) == nullptr)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
@@ -172,7 +172,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
{
wchar_t *szGroup;
- for (int i = 1; (szGroup = Clist_GroupGetName(i, NULL)) != NULL; i++) {
+ for (int i = 1; (szGroup = Clist_GroupGetName(i, nullptr)) != nullptr; i++) {
int id = SendDlgItemMessage(hdlg, IDC_GROUP, CB_ADDSTRING, 0, (LPARAM)szGroup);
SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETITEMDATA, (WPARAM)id, (LPARAM)i);
}
@@ -239,10 +239,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
GetDlgItemText(hdlg, IDC_USERID, szUserId, _countof(szUserId));
if (*rtrimw(szUserId) == 0 ||
- (strstr(acs->proto, "GG") && wcstoul(szUserId, NULL, 10) > INT_MAX) || // Gadu-Gadu protocol
- ((CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !wcstoul(szUserId, NULL, 10)))
+ (strstr(acs->proto, "GG") && wcstoul(szUserId, nullptr, 10) > INT_MAX) || // Gadu-Gadu protocol
+ ((CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !wcstoul(szUserId, nullptr, 10)))
{
- MessageBox(NULL,
+ MessageBox(nullptr,
TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
@@ -250,8 +250,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
PROTOSEARCHRESULT *psr;
if (strstr(acs->proto, "TLEN")) { // Tlen protocol
- if (wcschr(szUserId, '@') == NULL) {
- MessageBox(NULL,
+ if (wcschr(szUserId, '@') == nullptr) {
+ MessageBox(nullptr,
TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
@@ -271,7 +271,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
MCONTACT hContact = (MCONTACT)CallProtoService(acs->proto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr);
if (hContact == NULL) {
- MessageBox(NULL,
+ MessageBox(nullptr,
TranslateT("The contact cannot be added to your contact list. If you are not logged into the selected account, please try to do so. Also, make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
@@ -310,7 +310,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
}
// fall through
case IDCANCEL:
- if (GetParent(hdlg) == NULL)
+ if (GetParent(hdlg) == nullptr)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
@@ -319,7 +319,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
case WM_CLOSE:
/* if there is no parent for the dialog, its a modeless dialog and can't be killed using EndDialog() */
- if (GetParent(hdlg) == NULL)
+ if (GetParent(hdlg) == nullptr)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
@@ -335,7 +335,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
break;
case WM_DESTROY:
- hAddDlg = NULL;
+ hAddDlg = nullptr;
Window_FreeIcon_IcoLib(hdlg);
ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
if (acs) {