diff options
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index b5b47dbd2..e53fe64eb 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -429,7 +429,7 @@ private: int sysCaretHeight; }; -HINSTANCE ScintillaWin::hInstance = 0; +HINSTANCE ScintillaWin::hInstance {}; ATOM ScintillaWin::scintillaClassAtom = 0; ATOM ScintillaWin::callClassAtom = 0; @@ -474,7 +474,7 @@ ScintillaWin::ScintillaWin(HWND hwnd) { sysCaretHeight = 0; #if defined(USE_D2D) - pRenderTarget = 0; + pRenderTarget = nullptr; renderTargetValid = true; #endif @@ -604,7 +604,7 @@ void ScintillaWin::EnsureRenderTarget(HDC hdc) { void ScintillaWin::DropRenderTarget() { if (pRenderTarget) { pRenderTarget->Release(); - pRenderTarget = 0; + pRenderTarget = nullptr; } } @@ -2161,12 +2161,12 @@ bool ScintillaWin::CanPaste() { namespace { class GlobalMemory { - HGLOBAL hand; + HGLOBAL hand {}; public: - void *ptr; - GlobalMemory() : hand(0), ptr(0) { + void *ptr {}; + GlobalMemory() { } - explicit GlobalMemory(HGLOBAL hand_) : hand(hand_), ptr(0) { + explicit GlobalMemory(HGLOBAL hand_) : hand(hand_) { if (hand) { ptr = ::GlobalLock(hand); } @@ -2199,7 +2199,7 @@ public: ::SetClipboardData(uFormat, Unlock()); } operator bool() const { - return ptr != 0; + return ptr != nullptr; } SIZE_T Size() { return ::GlobalSize(hand); @@ -2446,7 +2446,7 @@ static VFunction *vtDropSource[] = { DropSource::DropSource() { vtbl = vtDropSource; - sci = 0; + sci = nullptr; } /// Implement IUnkown @@ -2572,7 +2572,7 @@ static VFunction *vtDataObject[] = { DataObject::DataObject() { vtbl = vtDataObject; - sci = 0; + sci = nullptr; } /// Implement IUnknown @@ -2635,7 +2635,7 @@ static VFunction *vtDropTarget[] = { DropTarget::DropTarget() { vtbl = vtDropTarget; - sci = 0; + sci = nullptr; } /** @@ -3293,7 +3293,7 @@ LRESULT PASCAL ScintillaWin::CTWndProc( ScintillaWin *sciThis = static_cast<ScintillaWin *>(PointerFromWindow(hWnd)); try { // ctp will be zero if WM_CREATE not seen yet - if (sciThis == 0) { + if (sciThis == nullptr) { if (iMessage == WM_CREATE) { // Associate CallTip object with window CREATESTRUCT *pCreate = static_cast<CREATESTRUCT *>(PtrFromSPtr(lParam)); @@ -3406,7 +3406,7 @@ LRESULT PASCAL ScintillaWin::SWndProc( // Find C++ object associated with window. ScintillaWin *sci = static_cast<ScintillaWin *>(PointerFromWindow(hWnd)); // sci will be zero if WM_CREATE not seen yet - if (sci == 0) { + if (sci == nullptr) { try { if (iMessage == WM_CREATE) { // Create C++ object associated with window |