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/StatusManager | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/StatusManager')
7 files changed, 11 insertions, 11 deletions
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp index 71805df1c1..aba644ffd4 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp @@ -389,9 +389,9 @@ static int HookWindowsHooks(int hookMiranda, int hookAll) } if (hookAll) { if (monitorKeyboard && hKeyBoardHook == nullptr) - hKeyBoardHook = SetWindowsHookEx(WH_KEYBOARD, KeyBoardHookFunction, 0, GetCurrentThreadId()); + hKeyBoardHook = SetWindowsHookEx(WH_KEYBOARD, KeyBoardHookFunction, nullptr, GetCurrentThreadId()); if (monitorMouse && hMouseHook == nullptr) - hMouseHook = SetWindowsHookEx(WH_MOUSE, MouseHookFunction, 0, GetCurrentThreadId()); + hMouseHook = SetWindowsHookEx(WH_MOUSE, MouseHookFunction, nullptr, GetCurrentThreadId()); } return 0; diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp index 7f12d2dfeb..6f5349098e 100644 --- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp +++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp @@ -28,7 +28,7 @@ struct TimerInfo HANDLE hEvent; }; -HANDLE hMainThread = 0; +HANDLE hMainThread = nullptr; unsigned long mainThreadId = 0; HANDLE hConnectionEvent = nullptr; @@ -108,7 +108,7 @@ int KSLoadOptions() UnhookEvent(hStatusChangeHook); UnhookEvent(hCSStatusChangeHook); UnhookEvent(hCSStatusChangeExHook); - hProtoAckHook = hStatusChangeHook = hCSStatusChangeHook = hCSStatusChangeExHook = 0; + hProtoAckHook = hStatusChangeHook = hCSStatusChangeHook = hCSStatusChangeExHook = nullptr; if (IsWindow(hMessageWindow)) DestroyWindow(hMessageWindow); @@ -803,7 +803,7 @@ static void CheckContinueslyFunction(void *) hostent = gethostbyname(host); if (hostent != nullptr) { addr = (DWORD *)(*hostent->h_addr_list); - bLastPingResult = (IcmpSendEcho(hICMPFile, *addr, 0, 0, nullptr, reply, sizeof(ICMP_ECHO_REPLY) + 8, 5000) != 0); + bLastPingResult = (IcmpSendEcho(hICMPFile, *addr, nullptr, 0, nullptr, reply, sizeof(ICMP_ECHO_REPLY) + 8, 5000) != 0); if (bLastPingResult) pingFailures = 0; diff --git a/plugins/StatusManager/src/StartupStatus/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp index a8af185308..7b637c35aa 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_options.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp @@ -250,7 +250,7 @@ INT_PTR CALLBACK CmdlOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA break; case WM_DESTROY: - delete optionsProtoSettings; optionsProtoSettings = 0; + delete optionsProtoSettings; optionsProtoSettings = nullptr; break; } diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp index 9bacd8e27c..d90a5a890b 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp @@ -114,7 +114,7 @@ INT_PTR GetProfileCount(WPARAM wParam, LPARAM) { int *def = (int*)wParam; int count = db_get_w(0, SSMODULENAME, SETTING_PROFILECOUNT, 0); - if (def != 0) { + if (def != nullptr) { *def = db_get_w(0, SSMODULENAME, SETTING_DEFAULTPROFILE, 0); if (*def >= count) *def = 0; diff --git a/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp index e80f19f2a4..628f4f192c 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp @@ -45,7 +45,7 @@ int CreateTopToolbarButtons(WPARAM, LPARAM) int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0); - TTBButton ttb = { 0 }; + TTBButton ttb = {}; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; ttb.pszService = MS_SS_LOADANDSETPROFILE; for (int i = 0; i < profileCount; i++) { diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp index 4487d2830f..146b69a96d 100644 --- a/plugins/StatusManager/src/commonstatus.cpp +++ b/plugins/StatusManager/src/commonstatus.cpp @@ -155,9 +155,9 @@ static void SetStatusMsg(PROTOCOLSETTINGEX *ps, int newstatus) wchar_t substituteStr[128]; if (!wcsnicmp(tszMsg + j, L"%time%", 6)) - GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, 0, 0, substituteStr, _countof(substituteStr)); + GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, nullptr, nullptr, substituteStr, _countof(substituteStr)); else if (!wcsnicmp(tszMsg + j, L"%date%", 6)) - GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, 0, 0, substituteStr, _countof(substituteStr)); + GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, nullptr, nullptr, substituteStr, _countof(substituteStr)); else continue; diff --git a/plugins/StatusManager/src/confirmdialog.cpp b/plugins/StatusManager/src/confirmdialog.cpp index 2e92f31b0f..c5d125150d 100644 --- a/plugins/StatusManager/src/confirmdialog.cpp +++ b/plugins/StatusManager/src/confirmdialog.cpp @@ -394,7 +394,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP break; case WM_DESTROY: - delete confirmSettings; confirmSettings = 0; + delete confirmSettings; confirmSettings = nullptr; break; } |