diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/ContactsPlus/src/utils.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/ContactsPlus/src/utils.cpp')
-rw-r--r-- | plugins/ContactsPlus/src/utils.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index 257cdb555f..9ea296f915 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -52,19 +52,19 @@ char* __fastcall null_strdup(const char *string) if (string)
return strdup(string);
- return NULL;
+ return nullptr;
}
wchar_t* GetContactUID(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if (INT_PTR(uid) == CALLSERVICE_NOTFOUND || uid == 0)
- return NULL;
+ if (INT_PTR(uid) == CALLSERVICE_NOTFOUND || uid == nullptr)
+ return nullptr;
DBVARIANT vrUid;
if (db_get_s(hContact, szProto, uid, &vrUid, 0))
- return NULL;
+ return nullptr;
if (vrUid.type == DBVT_DWORD) {
wchar_t tmp[100];
@@ -84,7 +84,7 @@ wchar_t* GetContactUID(MCONTACT hContact) return res;
}
- return NULL;
+ return nullptr;
}
void DialogAddContactExecute(HWND hwndDlg, MCONTACT hNewContact)
@@ -105,7 +105,7 @@ void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, MCONTACT hContact) HICON hIcon = LoadContactProtoIcon(hContact);
if (hIcon)
{
- DrawIconEx(dis->hDC, dis->rcItem.left, dis->rcItem.top, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
+ DrawIconEx(dis->hDC, dis->rcItem.left, dis->rcItem.top, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, nullptr, DI_NORMAL);
DestroyIcon(hIcon);
}
}
@@ -162,7 +162,7 @@ HICON LoadContactProtoIcon(MCONTACT hContact) char *szProto = GetContactProto(hContact);
if (szProto)
return (HICON)CallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
- return NULL;
+ return nullptr;
}
@@ -187,5 +187,5 @@ wchar_t* __fastcall strdupT(const wchar_t *string) {
if (string)
return (wchar_t*)wcsdup((wchar_t*)string);
- return NULL;
+ return nullptr;
}
|