From 8577d9ddca969c6ce07a8081f6380954c4816bc2 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 14 Feb 2018 23:05:24 +0100 Subject: [PATCH] Fix build warnings in Direct2D related code Regressions since df1456e4e2c2ac029ebcad17db5f5eb3478d1bc6 and b936bfe85efaf0e179ec6ce071853934aecdf43a. See https://github.com/wxWidgets/wxWidgets/pull/731 --- src/msw/graphicsd2d.cpp | 4 ++-- src/stc/PlatWX.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 5d562102b0..87e1a4bd01 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -41,8 +41,8 @@ #include #ifdef __MINGW64_TOOLCHAIN__ -#ifndef DRWITE_E_NOFONT -#define DWRITE_E_NOFONT _HRESULT_TYPEDEF_(0x88985002) +#ifndef DWRITE_E_NOFONT +#define DWRITE_E_NOFONT _HRESULT_TYPEDEF_(0x88985002L) #endif #endif diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 431d7a7361..b46c5ef885 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -797,9 +797,9 @@ bool SurfaceFontDataD2D::Initialised() const // SurfaceDataD2D SurfaceDataD2D::SurfaceDataD2D(ScintillaWX* editor) - : m_editor(editor), - m_pD2DFactory(::wxD2D1Factory()), - m_pDWriteFactory(::wxDWriteFactory()) + : m_pD2DFactory(::wxD2D1Factory()), + m_pDWriteFactory(::wxDWriteFactory()), + m_editor(editor) { if ( Initialised() ) { @@ -1107,7 +1107,7 @@ void SurfaceD2D::Release() m_clipsActive--; } hr = m_pRenderTarget->EndDraw(); - if ( hr == D2DERR_RECREATE_TARGET && m_surfaceData && !m_ownRenderTarget ) + if ( hr == (HRESULT)D2DERR_RECREATE_TARGET && m_surfaceData && !m_ownRenderTarget ) { m_surfaceData->DiscardGraphicsResources(); m_surfaceData->SetEditorPaintAbandoned();