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.
This commit is contained in:
Vadim Zeitlin 2023-01-05 21:21:32 +01:00
parent 0c97244747
commit e064f6b912

View file

@ -138,17 +138,14 @@ private:
// warning, so disable this warning explicitly as we can't do anything else // 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 // about it here (as actually using "override" here would result in an
// error for the first class in the hierarchy using wxCompositeWindow). // error for the first class in the hierarchy using wxCompositeWindow).
#if wxCHECK_GCC_VERSION(5,1) wxWARNING_SUPPRESS_MISSING_OVERRIDE()
wxGCC_ONLY_WARNING_SUPPRESS(suggest-override)
#endif
// Must be implemented by the derived class to return all children to which // Must be implemented by the derived class to return all children to which
// the public methods we override should forward to. // the public methods we override should forward to.
virtual wxWindowList GetCompositeWindowParts() const = 0; virtual wxWindowList GetCompositeWindowParts() const = 0;
#if wxCHECK_GCC_VERSION(5,1) wxWARNING_RESTORE_MISSING_OVERRIDE()
wxGCC_ONLY_WARNING_RESTORE(suggest-override)
#endif
template <class T, class TArg, class R> template <class T, class TArg, class R>
void SetForAllParts(R (wxWindowBase::*func)(TArg), T arg) void SetForAllParts(R (wxWindowBase::*func)(TArg), T arg)