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/FileAsMessage/src/main.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/FileAsMessage/src/main.cpp')
-rw-r--r-- | plugins/FileAsMessage/src/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 15c53a7c35..594e95e395 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -102,11 +102,11 @@ INT_PTR OnSendFile(WPARAM wParam, LPARAM) }
else
{
- if (hwnd != 0) WindowList_Remove(hFileList, hwnd);
+ if (hwnd != nullptr) WindowList_Remove(hFileList, hwnd);
FILEECHO *fe = new FILEECHO(wParam);
fe->inSend = TRUE;
- hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, DialogProc, (LPARAM)fe);
- if (hwnd == NULL)
+ hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), nullptr, DialogProc, (LPARAM)fe);
+ if (hwnd == nullptr)
{
delete fe;
return 0;
@@ -128,11 +128,11 @@ INT_PTR OnRecvMessage(WPARAM wParam, LPARAM lParam) HWND hwnd = WindowList_Find(hFileList, ccs->hContact);
if (!IsWindow(hwnd))
{
- if (hwnd != 0) WindowList_Remove(hFileList, hwnd);
+ if (hwnd != nullptr) WindowList_Remove(hFileList, hwnd);
FILEECHO *fe = new FILEECHO(ccs->hContact);
fe->inSend = FALSE;
- hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, DialogProc, (LPARAM)fe);
- if (hwnd == NULL)
+ hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), nullptr, DialogProc, (LPARAM)fe);
+ if (hwnd == nullptr)
{
delete fe;
return 0;
@@ -212,7 +212,7 @@ extern "C" __declspec(dllexport) int Load(void) HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
hHookDbSettingChange = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanged);
- hHookSkinIconsChanged = NULL;
+ hHookSkinIconsChanged = nullptr;
return 0;
}
@@ -224,7 +224,7 @@ extern "C" __declspec(dllexport) int Load(void) extern "C" __declspec(dllexport) int Unload(void)
{
WindowList_Destroy(hFileList);
- if (hHookSkinIconsChanged != NULL)
+ if (hHookSkinIconsChanged != nullptr)
UnhookEvent(hHookSkinIconsChanged);
UnhookEvent(hHookDbSettingChange);
UnhookEvent(hHookContactAdded);
|