From 46188ff56f15115e5d5feb4a7f7235a77be86cfe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Feb 2019 21:17:37 +0100 Subject: [PATCH] Remove dynamic_cast-based implementation of CreateFromUnknownDC() There doesn't seem to be any point to have both wxRTTI-based implementation and the standard RTTI-based one, so leave the former one only. --- src/common/graphcmn.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 3658c7d8db..42cde7cc79 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -989,25 +989,6 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc) { -#ifndef wxNO_RTTI - if ( const wxWindowDC *windc = dynamic_cast(&dc) ) - return Create(*windc); - - if ( const wxMemoryDC *memdc = dynamic_cast(&dc) ) - return Create(*memdc); - -#if wxUSE_PRINTING_ARCHITECTURE - if ( const wxPrinterDC *printdc = dynamic_cast(&dc) ) - return Create(*printdc); -#endif - -#ifdef __WXMSW__ -#if wxUSE_ENH_METAFILE - if ( const wxEnhMetaFileDC *mfdc = dynamic_cast(&dc) ) - return Create(*mfdc); -#endif -#endif -#else // wxNO_RTTI if ( const wxWindowDC *windc = wxDynamicCast(&dc, wxWindowDC) ) return Create(*windc); @@ -1025,7 +1006,6 @@ wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc) return Create(*mfdc); #endif #endif -#endif // !wxNO_RTTI/wxNO_RTTI return NULL; }