diff options
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/PlatWin.cxx | 6 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 3 | 
2 files changed, 5 insertions, 4 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 { diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 611c9a960..aa28d7439 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -491,7 +491,8 @@ void ScintillaWin::Init() {  	// Find SetCoalescableTimer which is only available from Windows 8+  	HMODULE user32 = ::GetModuleHandle(TEXT("user32.dll"));  	if (user32) { -		SetCoalescableTimerFn = (SetCoalescableTimerSig)::GetProcAddress(user32, "SetCoalescableTimer"); +		SetCoalescableTimerFn = reinterpret_cast<SetCoalescableTimerSig>( +			::GetProcAddress(user32, "SetCoalescableTimer"));  	}  	vs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(INDIC_HIDDEN, ColourDesired(0, 0, 0xff));  | 
