From b6c4500a92fc089ea532600f9fac280177498799 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 9 Feb 2020 11:06:05 +1100 Subject: Use uniform initialization for resetting GDI handles to avoid NULL/0 warnings. Changed HDC, HPEN, HBRUSH, HFONT, HRGN, and HBITMAP. --- win32/ScintillaWin.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'win32/ScintillaWin.cxx') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 8007dc664..ef933afdc 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -486,7 +486,7 @@ ScintillaWin::ScintillaWin(HWND hwnd) { linesPerScroll = 0; wheelDelta = 0; // Wheel delta from roll - hRgnUpdate = 0; + hRgnUpdate = {}; hasOKText = false; @@ -510,7 +510,7 @@ ScintillaWin::ScintillaWin(HWND hwnd) { ds.sci = this; dt.sci = this; - sysCaretBitmap = 0; + sysCaretBitmap = {}; sysCaretWidth = 0; sysCaretHeight = 0; @@ -910,7 +910,7 @@ sptr_t ScintillaWin::WndPaint() { } if (hRgnUpdate) { ::DeleteRgn(hRgnUpdate); - hRgnUpdate = 0; + hRgnUpdate = {}; } ::EndPaint(MainHWND(), &ps); @@ -3059,7 +3059,7 @@ void ScintillaWin::FullPaint() { FullPaintDC(hdc); ::ReleaseDC(MainHWND(), hdc); } else { - FullPaintDC(0); + FullPaintDC({}); } } @@ -3336,7 +3336,7 @@ BOOL ScintillaWin::DestroySystemCaret() noexcept { const BOOL retval = ::DestroyCaret(); if (sysCaretBitmap) { ::DeleteObject(sysCaretBitmap); - sysCaretBitmap = 0; + sysCaretBitmap = {}; } return retval; } -- cgit v1.2.3