From d1dfcd1497495185c90a61c803fb9be8132b06d3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 Sep 2015 00:44:08 +0200 Subject: [PATCH] Fix some g++ warnings in D2D graphics code Avoid warnings about a class with virtual methods having non-virtual dtor and not handling an enum value in a switch. See #16625. --- src/msw/graphicsd2d.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 061582fe93..13534bc9a5 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -1355,6 +1355,8 @@ public: { } + virtual ~wxHatchBitmapSource() {} + HRESULT STDMETHODCALLTYPE GetSize(__RPC__out UINT *width, __RPC__out UINT *height) wxOVERRIDE { if (width != NULL) *width = 8; @@ -3700,6 +3702,12 @@ void wxD2DRenderer::GetVersion(int* major, int* minor, int* micro) const case wxDirect2D::wxD2D_VERSION_1_1: *minor = 1; break; + case wxDirect2D::wxD2D_VERSION_NONE: + // This is not supposed to happen, but we handle this value in + // the switch to ensure that we'll get warnings if any new + // values, not handled here, are added to the enum later. + *minor = -1; + break; } }