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/MsgPopup | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/MsgPopup')
-rw-r--r-- | plugins/MsgPopup/src/main.cpp | 8 | ||||
-rw-r--r-- | plugins/MsgPopup/src/options.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index 1b60c02fa9..f9bc4d51f1 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -86,7 +86,7 @@ void popupMessage(LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) ppd.colorText = options.FG[indx];
ppd.iSeconds = options.Timeout[indx];
- ppd.lchIcon = (HICON)LoadImage(NULL, MAKEINTRESOURCE(iIcon), IMAGE_ICON, SM_CXSMICON, SM_CYSMICON, LR_SHARED);
+ ppd.lchIcon = (HICON)LoadImage(nullptr, MAKEINTRESOURCE(iIcon), IMAGE_ICON, SM_CXSMICON, SM_CYSMICON, LR_SHARED);
mir_wstrcpy(ppd.lptzContactName, lpCaption);
mir_wstrcpy(ppd.lptzText, lpText);
PUAddPopupT(&ppd);
@@ -112,7 +112,7 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, PVOID lpOrigFunc, PVOID ULONG ulSize;
PIMAGE_IMPORT_DESCRIPTOR pImportDesc = (PIMAGE_IMPORT_DESCRIPTOR)
ImageDirectoryEntryToData(hModule, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &ulSize);
- if (pImportDesc == NULL)
+ if (pImportDesc == nullptr)
return;
for (; pImportDesc->Name; pImportDesc++) {
@@ -136,14 +136,14 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, PVOID lpOrigFunc, PVOID g_HookError = TRUE;
mir_snwprintf(buf, TranslateT("VirtualProtect failed. Code %d\nTry to call the author"), GetLastError());
- prevMessageBox(0, buf, TranslateT("Error"), MB_OK);
+ prevMessageBox(nullptr, buf, TranslateT("Error"), MB_OK);
}
}
*(PVOID*)ppfn = lpNewFunc;
if (*(PVOID*)ppfn != lpNewFunc) {
if (!g_HookError2) {
g_HookError2 = TRUE;
- prevMessageBox(0, TranslateT("Hmm. Something goes wrong. I can't write into the memory.\nAnd as you can see, there are no any exception raised...\nTry to call the author"), TranslateT("Error"), MB_OK);
+ prevMessageBox(nullptr, TranslateT("Hmm. Something goes wrong. I can't write into the memory.\nAnd as you can see, there are no any exception raised...\nTry to call the author"), TranslateT("Error"), MB_OK);
}
}
}
diff --git a/plugins/MsgPopup/src/options.cpp b/plugins/MsgPopup/src/options.cpp index 0698089b72..b8883e91db 100644 --- a/plugins/MsgPopup/src/options.cpp +++ b/plugins/MsgPopup/src/options.cpp @@ -54,10 +54,10 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l case WM_COMMAND:
if (LOWORD(wParam) == IDC_PREVIEW) {
- MessageBox(0, TranslateT("Message with question"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONQUESTION);
- MessageBox(0, TranslateT("Message with exclamation"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
- MessageBox(0, TranslateT("Message with error"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONSTOP);
- MessageBox(0, TranslateT("Message with asterisk"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONASTERISK);
+ MessageBox(nullptr, TranslateT("Message with question"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONQUESTION);
+ MessageBox(nullptr, TranslateT("Message with exclamation"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
+ MessageBox(nullptr, TranslateT("Message with error"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONSTOP);
+ MessageBox(nullptr, TranslateT("Message with asterisk"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONASTERISK);
return FALSE;
}
|