diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-30 09:50:12 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-30 09:50:12 +1000 |
commit | 3385ec0a828806e7711eb277ac6b3a1a8ed70f6b (patch) | |
tree | fc76c7d76f709bcb11ff63a8e9e21b884f7ccf21 /win32/PlatWin.cxx | |
parent | bbf4be9b34bc774eb9fc723ad3ef197198849ba0 (diff) | |
download | scintilla-mirror-3385ec0a828806e7711eb277ac6b3a1a8ed70f6b.tar.gz |
Backport: Use C++ casts in preference to C casts. Use nullptr instead of 0.
Backport of changeset 6761:3d5f0669be84.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 0d5cbdacf..3e6b02438 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -111,7 +111,7 @@ bool LoadD2D() { hDLLD2D = ::LoadLibraryEx(TEXT("D2D1.DLL"), 0, loadLibraryFlags); if (hDLLD2D) { - D2D1CFSig fnD2DCF = (D2D1CFSig)::GetProcAddress(hDLLD2D, "D2D1CreateFactory"); + D2D1CFSig fnD2DCF = reinterpret_cast<D2D1CFSig>(::GetProcAddress(hDLLD2D, "D2D1CreateFactory")); if (fnD2DCF) { // A single threaded factory as Scintilla always draw on the GUI thread fnD2DCF(D2D1_FACTORY_TYPE_SINGLE_THREADED, @@ -122,7 +122,7 @@ bool LoadD2D() { } hDLLDWrite = ::LoadLibraryEx(TEXT("DWRITE.DLL"), 0, loadLibraryFlags); if (hDLLDWrite) { - DWriteCFSig fnDWCF = (DWriteCFSig)::GetProcAddress(hDLLDWrite, "DWriteCreateFactory"); + DWriteCFSig fnDWCF = reinterpret_cast<DWriteCFSig>(::GetProcAddress(hDLLDWrite, "DWriteCreateFactory")); if (fnDWCF) { fnDWCF(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), @@ -474,7 +474,7 @@ class VarBuffer { T bufferStandard[lengthStandard]; public: T *buffer; - explicit VarBuffer(size_t length) : buffer(0) { + explicit VarBuffer(size_t length) : buffer(nullptr) { if (length > lengthStandard) { buffer = new T[length]; } else { |