Suppress -Wfloat-equal when defining float16 equality operators
Change-Id: Ie30fa13eb5f8eb44f0c9c21e9483c8aba40cec02 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>bb10
parent
13cfa3c88b
commit
2f10a6f04e
|
|
@ -196,6 +196,10 @@ QF16_MAKE_ARITH_OP_INT(*)
|
|||
QF16_MAKE_ARITH_OP_INT(/)
|
||||
#undef QF16_MAKE_ARITH_OP_INT
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
|
||||
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
|
||||
|
||||
inline bool operator>(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast<float>(a) > static_cast<float>(b); }
|
||||
inline bool operator<(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast<float>(a) < static_cast<float>(b); }
|
||||
inline bool operator>=(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast<float>(a) >= static_cast<float>(b); }
|
||||
|
|
@ -230,6 +234,8 @@ QF16_MAKE_BOOL_OP_INT(==)
|
|||
QF16_MAKE_BOOL_OP_INT(!=)
|
||||
#undef QF16_MAKE_BOOL_OP_INT
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue