From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/mTextControl/src/textcontrol.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/mTextControl/src/textcontrol.cpp') diff --git a/plugins/mTextControl/src/textcontrol.cpp b/plugins/mTextControl/src/textcontrol.cpp index 4dad57ec55..b8f66ef432 100644 --- a/plugins/mTextControl/src/textcontrol.cpp +++ b/plugins/mTextControl/src/textcontrol.cpp @@ -39,12 +39,12 @@ void MTextControl_RegisterClass() wcl.cbClsExtra = 0; wcl.cbWndExtra = 0; wcl.hInstance = hInst; - wcl.hIcon = NULL; - wcl.hCursor = LoadCursor(NULL, IDC_ARROW); + wcl.hIcon = nullptr; + wcl.hCursor = LoadCursor(nullptr, IDC_ARROW); wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH); - wcl.lpszMenuName = NULL; + wcl.lpszMenuName = nullptr; wcl.lpszClassName = MODULNAMEW; - wcl.hIconSm = 0; + wcl.hIconSm = nullptr; RegisterClassEx(&wcl); } @@ -54,8 +54,8 @@ LRESULT CALLBACK MTextControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM switch (msg) { case WM_CREATE: data = new TextControlData; - data->text = 0; - data->mtext = 0; + data->text = nullptr; + data->mtext = nullptr; data->htu = htuDefault; SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data); PostMessage(hwnd, MTM_UPDATE, 0, 0); @@ -81,7 +81,7 @@ LRESULT CALLBACK MTextControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM RECT rc; GetClientRect(hwnd, &rc); MTI_MTextSetParent(data->mtext, hwnd, rc); - InvalidateRect(hwnd, 0, TRUE); + InvalidateRect(hwnd, nullptr, TRUE); } return TRUE; @@ -120,7 +120,7 @@ LRESULT MTextControl_OnPaint(HWND hwnd, WPARAM, LPARAM) // Find the text to draw TextControlData *data = (TextControlData *)GetWindowLongPtr(hwnd, GWLP_USERDATA); if (data->mtext) { - HFONT hfntSave = 0; + HFONT hfntSave = nullptr; HFONT hfnt = (HFONT)SendMessage(hwnd, WM_GETFONT, 0, 0); if (!hfnt) hfnt = (HFONT)SendMessage(GetParent(hwnd), WM_GETFONT, 0, 0); -- cgit v1.2.3