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.
This commit is contained in:
Vadim Zeitlin
2015-09-29 00:44:08 +02:00
parent 2a9a42fd23
commit d1dfcd1497

View File

@@ -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;
}
}