Suppress bogus -Wnoexcept from gcc9 in wx/graphics.h
Due to what looks like a bug, gcc 9.3.0 gives the following incomplete error message without it: include/wx/graphics.h:278:7: error: but ‘wxGraphicsGradientStop::wxGraphicsGradientStop(wxGraphicsGradientStop&&)’ does not throw; perhaps it should be declared ‘noexcept’ [-Werror=noexcept] (without any other diagnostics).
This commit is contained in:
@@ -274,6 +274,12 @@ extern WXDLLIMPEXP_DATA_CORE(wxGraphicsMatrix) wxNullGraphicsMatrix;
|
|||||||
// and how they are spread out in a gradient
|
// and how they are spread out in a gradient
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// gcc 9 gives a nonsensical warning about implicitly generated move ctor not
|
||||||
|
// throwing but not being noexcept, suppress it.
|
||||||
|
#if wxCHECK_GCC_VERSION(9, 1) && !wxCHECK_GCC_VERSION(10, 0)
|
||||||
|
wxGCC_WARNING_SUPPRESS(noexcept)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Describes a single gradient stop.
|
// Describes a single gradient stop.
|
||||||
class wxGraphicsGradientStop
|
class wxGraphicsGradientStop
|
||||||
{
|
{
|
||||||
@@ -306,6 +312,10 @@ private:
|
|||||||
float m_pos;
|
float m_pos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if wxCHECK_GCC_VERSION(9, 1) && !wxCHECK_GCC_VERSION(10, 0)
|
||||||
|
wxGCC_WARNING_RESTORE(noexcept)
|
||||||
|
#endif
|
||||||
|
|
||||||
// A collection of gradient stops ordered by their positions (from lowest to
|
// A collection of gradient stops ordered by their positions (from lowest to
|
||||||
// highest). The first stop (index 0, position 0.0) is always the starting
|
// highest). The first stop (index 0, position 0.0) is always the starting
|
||||||
// colour and the last one (index GetCount() - 1, position 1.0) is the end
|
// colour and the last one (index GetCount() - 1, position 1.0) is the end
|
||||||
|
Reference in New Issue
Block a user