summaryrefslogtreecommitdiff
path: root/plugins/YAPP/src/message_pump.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/YAPP/src/message_pump.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/YAPP/src/message_pump.cpp')
-rw-r--r--plugins/YAPP/src/message_pump.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/YAPP/src/message_pump.cpp b/plugins/YAPP/src/message_pump.cpp
index ea3e0b3197..606401da6b 100644
--- a/plugins/YAPP/src/message_pump.cpp
+++ b/plugins/YAPP/src/message_pump.cpp
@@ -14,9 +14,9 @@ unsigned __stdcall MessagePumpThread(void* param)
if (param)
SetEvent((HANDLE)param);
- MSG hwndMsg = { 0 };
- while (GetMessage(&hwndMsg, 0, 0, 0) > 0 && !bShutdown) {
- if (hwndMsg.hwnd != NULL && IsDialogMessage(hwndMsg.hwnd, &hwndMsg)) /* Wine fix. */
+ MSG hwndMsg = {};
+ while (GetMessage(&hwndMsg, nullptr, 0, 0) > 0 && !bShutdown) {
+ if (hwndMsg.hwnd != nullptr && IsDialogMessage(hwndMsg.hwnd, &hwndMsg)) /* Wine fix. */
continue;
switch(hwndMsg.message) {
case MUM_CREATEPOPUP:
@@ -30,7 +30,7 @@ unsigned __stdcall MessagePumpThread(void* param)
PopupData *pd = (PopupData*)hwndMsg.lParam;
if (enabled && num_popups < MAX_POPUPS) {
- HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, L"Popup", WS_POPUP, 0, 0, 0, 0, 0, 0, hInst, (LPVOID)hwndMsg.lParam);
+ HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, L"Popup", WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, hInst, (LPVOID)hwndMsg.lParam);
num_popups++;
if (hwndMsg.wParam) // set notifyer handle
SendMessage(hwnd, PUM_SETNOTIFYH, hwndMsg.wParam, 0);
@@ -93,12 +93,12 @@ void InitMessagePump()
popup_win_class.lpfnWndProc = PopupWindowProc;
popup_win_class.hInstance = hInst;
popup_win_class.lpszClassName = POP_WIN_CLASS;
- popup_win_class.hCursor = LoadCursor(NULL, IDC_ARROW);
+ popup_win_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
RegisterClass(&popup_win_class);
InitServices();
- hMPEvent = CreateEvent(0, TRUE, 0, 0);
+ hMPEvent = CreateEvent(nullptr, TRUE, 0, nullptr);
CloseHandle(mir_forkthreadex(MessagePumpThread, hMPEvent, &message_pump_thread_id));
WaitForSingleObject(hMPEvent, INFINITE);
CloseHandle(hMPEvent);