From 82f3234d9531a43f9fd16a3a9eb8c72088ab0a5a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 Jul 2015 18:25:05 +0200 Subject: [PATCH] Avoid g++ 3.4.5 warning about wxMSWOwnerDrawnButtonBase dtor. Fixing the warning for recent g++ versions introduced it for the old one, so work around this inside our workaround. See #17005. --- include/wx/msw/ownerdrawnbutton.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/wx/msw/ownerdrawnbutton.h b/include/wx/msw/ownerdrawnbutton.h index 054076e675..2cb6c785f9 100644 --- a/include/wx/msw/ownerdrawnbutton.h +++ b/include/wx/msw/ownerdrawnbutton.h @@ -37,7 +37,14 @@ protected: // has virtual functions, but no virtual destructor without making the dtor // virtual which is not needed here as objects are never deleted via // pointers to this class (and protected dtor enforces this). + // + // Unfortunately g++ 3.4.5 still complains about the dtor being non virtual + // even if it is protected, but actually does not give any warnings if the + // dtor is not defined at all, so work around this 3.4.5 bug inside our + // general g++ workaround. +#if wxCHECK_GCC_VERSION(4, 0) ~wxMSWOwnerDrawnButtonBase() { } +#endif // g++ 4.0+ // Make the control owner drawn if necessary to implement support for the // given foreground colour.