Add wxGCC_WARNING_{SUPPRESS,RESTORE} macros and use them for -Wfloat-equal.
Suppress the warnings about comparing floating point values for equality in wxWidgets headers when the user code is compiled with -Wfloat-equal (at least when using g++ 4.6 or later). Closes #14895. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -912,6 +912,8 @@ public:
|
||||
WXANY_IMPLEMENT_INT_EQ_OP(wxLongLong_t, wxULongLong_t)
|
||||
#endif
|
||||
|
||||
wxGCC_WARNING_SUPPRESS(float-equal)
|
||||
|
||||
bool operator==(float value) const
|
||||
{
|
||||
if ( !wxAnyValueTypeImpl<float>::IsSameClass(m_type) )
|
||||
@@ -932,6 +934,8 @@ public:
|
||||
(wxAnyValueTypeImpl<double>::GetValue(m_buffer));
|
||||
}
|
||||
|
||||
wxGCC_WARNING_RESTORE(float-equal)
|
||||
|
||||
bool operator==(bool value) const
|
||||
{
|
||||
if ( !wxAnyValueTypeImpl<bool>::IsSameClass(m_type) )
|
||||
|
Reference in New Issue
Block a user