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:
parent
caaa08be07
commit
5e906d80d8
2 changed files with 2 additions and 4 deletions
|
|
@ -438,10 +438,8 @@ public:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef wxNO_RTTI
|
||||
// Create a context from a DC of unknown type, if supported, returns NULL otherwise
|
||||
static wxGraphicsContext* CreateFromUnknownDC(const wxDC& dc);
|
||||
#endif
|
||||
|
||||
static wxGraphicsContext* CreateFromNative( void * context );
|
||||
|
||||
|
|
|
|||
|
|
@ -926,9 +926,9 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef wxNO_RTTI
|
||||
wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc)
|
||||
{
|
||||
#ifndef wxNO_RTTI
|
||||
if ( const wxWindowDC *windc = dynamic_cast<const wxWindowDC*>(&dc) )
|
||||
return Create(*windc);
|
||||
|
||||
|
|
@ -946,10 +946,10 @@ wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc)
|
|||
return Create(*mfdc);
|
||||
#endif
|
||||
#endif
|
||||
#endif // !wxNO_RTTI
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue