From 65cc4c16246bb3b5f9598f7617fff2e40893e999 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 12 Nov 2017 09:33:37 -0800 Subject: [PATCH] Avoid ifdef-ed override specification Instead, add the base class functions so the derived class always overrides. If/when wxX11 and wxMotif are removed there won't be an ifdef that no one ever notices isn't needed anymore. --- include/wx/motif/app.h | 1 + include/wx/unix/glx11.h | 5 +---- include/wx/x11/app.h | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/wx/motif/app.h b/include/wx/motif/app.h index ead5545457..9b8f4ce232 100644 --- a/include/wx/motif/app.h +++ b/include/wx/motif/app.h @@ -80,6 +80,7 @@ public: virtual void HandlePropertyChange(WXEvent *event); wxXVisualInfo* GetVisualInfo(WXDisplay* display); + virtual void* GetXVisualInfo() { return NULL; } private: // Motif-specific diff --git a/include/wx/unix/glx11.h b/include/wx/unix/glx11.h index a27c470332..e6c20c6202 100644 --- a/include/wx/unix/glx11.h +++ b/include/wx/unix/glx11.h @@ -146,10 +146,7 @@ public: // This method is not currently used by the library itself, but remains for // backwards compatibility and also because wxGTK has it we could start // using it for the same purpose in wxX11 too some day. - virtual void *GetXVisualInfo() -#ifdef __WXGTK20__ - wxOVERRIDE -#endif + virtual void* GetXVisualInfo() wxOVERRIDE { return wxGLCanvasX11::GetDefaultXVisualInfo(); } diff --git a/include/wx/x11/app.h b/include/wx/x11/app.h index ead852f334..5902ddd8bd 100644 --- a/include/wx/x11/app.h +++ b/include/wx/x11/app.h @@ -84,6 +84,7 @@ public: // with multiple display return m_visualInfo; } + virtual void* GetXVisualInfo() { return NULL; } public: static long sm_lastMessageTime;