From 14cfc2c2b2835d83468c34f7878fbe25dfcbe3f4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Dec 2019 22:35:36 +0100 Subject: [PATCH] Avoid clang -Wnon-virtual-dtor without triggering MSVC warnings The change of 4990515abaff2ef43b85c1004dacc3cee54b9cac resulted in (disabled by default, but which may be enabled when building applications using wxWidgets) MSVS 2017 warning C4265 ('class' : class has virtual functions, but destructor is not virtual), so test for clang explicitly instead of just testing for non-gcc. --- include/wx/msw/ownerdrawnbutton.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/msw/ownerdrawnbutton.h b/include/wx/msw/ownerdrawnbutton.h index 8df7f84238..98da1e67d5 100644 --- a/include/wx/msw/ownerdrawnbutton.h +++ b/include/wx/msw/ownerdrawnbutton.h @@ -42,7 +42,7 @@ protected: // 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 !defined(__GNUC__) || wxCHECK_GCC_VERSION(4, 0) +#if wxCHECK_GCC_VERSION(4, 0) || defined(__clang__) ~wxMSWOwnerDrawnButtonBase() { } #endif // g++ 4.0+