aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 71b6d9e5e..174b8aa15 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;
}
}
@@ -2185,12 +2185,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);
}
@@ -2223,7 +2223,7 @@ public:
::SetClipboardData(uFormat, Unlock());
}
operator bool() const {
- return ptr != 0;
+ return ptr != nullptr;
}
SIZE_T Size() {
return ::GlobalSize(hand);
@@ -2470,7 +2470,7 @@ static VFunction *vtDropSource[] = {
DropSource::DropSource() {
vtbl = vtDropSource;
- sci = 0;
+ sci = nullptr;
}
/// Implement IUnkown
@@ -2596,7 +2596,7 @@ static VFunction *vtDataObject[] = {
DataObject::DataObject() {
vtbl = vtDataObject;
- sci = 0;
+ sci = nullptr;
}
/// Implement IUnknown
@@ -2659,7 +2659,7 @@ static VFunction *vtDropTarget[] = {
DropTarget::DropTarget() {
vtbl = vtDropTarget;
- sci = 0;
+ sci = nullptr;
}
/**
@@ -3316,7 +3316,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));
@@ -3430,7 +3430,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