From e064f6b912c7ade76881c121aa8cbe73c4123807 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 5 Jan 2023 21:21:32 +0100 Subject: [PATCH] Suppress GetCompositeWindowParts() override warning for clang too This uses the macro suppressing the warning for both gcc and clang instead of doing it just for gcc as 58840fe7fd (Suppress unavoidable -Wsuggest-override in wxCompositeWindow, 2022-12-25) did. This is more correct and also simpler and shorter. --- include/wx/compositewin.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/wx/compositewin.h b/include/wx/compositewin.h index b6166fd67e..cfed7ec44a 100644 --- a/include/wx/compositewin.h +++ b/include/wx/compositewin.h @@ -138,17 +138,14 @@ private: // warning, so disable this warning explicitly as we can't do anything else // about it here (as actually using "override" here would result in an // error for the first class in the hierarchy using wxCompositeWindow). -#if wxCHECK_GCC_VERSION(5,1) - wxGCC_ONLY_WARNING_SUPPRESS(suggest-override) -#endif + wxWARNING_SUPPRESS_MISSING_OVERRIDE() // Must be implemented by the derived class to return all children to which // the public methods we override should forward to. virtual wxWindowList GetCompositeWindowParts() const = 0; -#if wxCHECK_GCC_VERSION(5,1) - wxGCC_ONLY_WARNING_RESTORE(suggest-override) -#endif + wxWARNING_RESTORE_MISSING_OVERRIDE() + template void SetForAllParts(R (wxWindowBase::*func)(TArg), T arg)