Fix build with wxNO_RTTI
Since CreateFromUnknownDC() can return NULL anyway, just always define it, and have it always return NULL with wxNO_RTTI See #17765
This commit is contained in:
@@ -438,10 +438,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef wxNO_RTTI
|
|
||||||
// Create a context from a DC of unknown type, if supported, returns NULL otherwise
|
// Create a context from a DC of unknown type, if supported, returns NULL otherwise
|
||||||
static wxGraphicsContext* CreateFromUnknownDC(const wxDC& dc);
|
static wxGraphicsContext* CreateFromUnknownDC(const wxDC& dc);
|
||||||
#endif
|
|
||||||
|
|
||||||
static wxGraphicsContext* CreateFromNative( void * context );
|
static wxGraphicsContext* CreateFromNative( void * context );
|
||||||
|
|
||||||
|
@@ -926,9 +926,9 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef wxNO_RTTI
|
|
||||||
wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc)
|
wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc)
|
||||||
{
|
{
|
||||||
|
#ifndef wxNO_RTTI
|
||||||
if ( const wxWindowDC *windc = dynamic_cast<const wxWindowDC*>(&dc) )
|
if ( const wxWindowDC *windc = dynamic_cast<const wxWindowDC*>(&dc) )
|
||||||
return Create(*windc);
|
return Create(*windc);
|
||||||
|
|
||||||
@@ -946,10 +946,10 @@ wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc)
|
|||||||
return Create(*mfdc);
|
return Create(*mfdc);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif // !wxNO_RTTI
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
|
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user