summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-12-16 12:56:23 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-03-07 10:51:54 +0000
commite7295c959b73cec09e36d3703d5619e8e7aa5fb1 (patch)
tree74ecb9547e494c55f8c91a10d07cc6ef29526276 /src/corelib/tools
parent7eb11df19e0c0c52b877bc9ded357763bc014316 (diff)
Add -Wfloat-equal to Qt's header clean check
Task-number: QTBUG-57649 Change-Id: I15b62e0f9cec482fbb40fffd1490d802c54bf0fe Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qrect.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index f973cf3494..4030cccbd5 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -662,12 +662,18 @@ Q_DECL_CONSTEXPR inline QRectF::QRectF(const QRect &r) Q_DECL_NOTHROW
{
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
+QT_WARNING_DISABLE_GCC("-Wfloat-equal")
+
Q_DECL_CONSTEXPR inline bool QRectF::isNull() const Q_DECL_NOTHROW
{ return w == 0. && h == 0.; }
Q_DECL_CONSTEXPR inline bool QRectF::isEmpty() const Q_DECL_NOTHROW
{ return w <= 0. || h <= 0.; }
+QT_WARNING_POP
+
Q_DECL_CONSTEXPR inline bool QRectF::isValid() const Q_DECL_NOTHROW
{ return w > 0. && h > 0.; }