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/ProfileManager | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/ProfileManager')
-rw-r--r-- | plugins/ProfileManager/src/pmanagerEx.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index 9bc378596b..4b221431e1 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -49,8 +49,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) static INT_PTR ChangePM(WPARAM, LPARAM)
{
wchar_t fn[MAX_PATH];
- GetModuleFileName(GetModuleHandle(NULL), fn, _countof(fn));
- ShellExecute(0, L"open", fn, L"/ForceShowPM", L"", 1);
+ GetModuleFileName(GetModuleHandle(nullptr), fn, _countof(fn));
+ ShellExecute(nullptr, L"open", fn, L"/ForceShowPM", L"", 1);
CallService("CloseAction", 0, 0);
return 0;
}
@@ -58,22 +58,22 @@ static INT_PTR ChangePM(WPARAM, LPARAM) static INT_PTR LoadPM(WPARAM, LPARAM)
{
wchar_t fn[MAX_PATH];
- GetModuleFileName(GetModuleHandle(NULL), fn, _countof(fn));
- ShellExecute(0, L"open", fn, L"/ForceShowPM", L"", 1);
+ GetModuleFileName(GetModuleHandle(nullptr), fn, _countof(fn));
+ ShellExecute(nullptr, L"open", fn, L"/ForceShowPM", L"", 1);
return 0;
}
static INT_PTR CheckDb(WPARAM, LPARAM)
{
- if (MessageBox(0, TranslateT("Miranda NG will exit and Database checker will start.\n\nAre you sure you want to do this?"), TranslateT("Check database"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2) == IDYES) {
+ if (MessageBox(nullptr, TranslateT("Miranda NG will exit and Database checker will start.\n\nAre you sure you want to do this?"), TranslateT("Check database"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2) == IDYES) {
wchar_t mirandaPath[MAX_PATH], cmdLine[100];
PROCESS_INFORMATION pi;
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
- GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
+ GetModuleFileName(nullptr, mirandaPath, _countof(mirandaPath));
mir_snwprintf(cmdLine, L"\"%s\" /restart:%d /svc:dbchecker", mirandaPath, GetCurrentProcessId());
CallService("CloseAction", 0, 0);
- CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
+ CreateProcess(mirandaPath, cmdLine, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &si, &pi);
}
return 0;
}
@@ -120,7 +120,7 @@ extern "C" __declspec(dllexport) int Load(void) mi.hIcolibItem = iconList[i].hIcolib;
mi.uid = uids[i];
if (i == 3)
- mi.root = NULL;
+ mi.root = nullptr;
Menu_AddMainMenuItem(&mi);
}
|