diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-13 11:31:25 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-13 11:00:27 +0000 |
commit | 2f10a6f04eb12db5d438c103431c0b35ae0a0ee2 (patch) | |
tree | 6c43e0e71869d67e406b948958fa211c2b2beedd /src | |
parent | 13cfa3c88be220dbb732975bd76d19dfa70c4469 (diff) |
Suppress -Wfloat-equal when defining float16 equality operators
Change-Id: Ie30fa13eb5f8eb44f0c9c21e9483c8aba40cec02
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qfloat16.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 8fd2f212af..651057f8e2 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -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 */ |