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:
@@ -1355,6 +1355,8 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~wxHatchBitmapSource() {}
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE GetSize(__RPC__out UINT *width, __RPC__out UINT *height) wxOVERRIDE
|
HRESULT STDMETHODCALLTYPE GetSize(__RPC__out UINT *width, __RPC__out UINT *height) wxOVERRIDE
|
||||||
{
|
{
|
||||||
if (width != NULL) *width = 8;
|
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:
|
case wxDirect2D::wxD2D_VERSION_1_1:
|
||||||
*minor = 1;
|
*minor = 1;
|
||||||
break;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user