summaryrefslogtreecommitdiff
path: root/src/multimedia/camera
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-12-16 15:06:49 -0800
committerYoann Lopes <yoann.lopes@qt.io>2017-01-26 13:27:15 +0000
commite5ee1e036eaecb91797cbe85ac7f8929145f3d65 (patch)
treeeb606973642a18faaae6823817ceed289a97cb67 /src/multimedia/camera
parent7ab948c7259d9a856a0b0c52897cb430731494c3 (diff)
downloadqtmultimedia-e5ee1e036eaecb91797cbe85ac7f8929145f3d65.tar.gz
Suppress the -Wfloat-equal warning
qcamera.h:261:36: error: comparing floating point with == or != is unsafe [-Werror=float-equal] Task-number: QTBUG-57649 Change-Id: I15b62e0f9cec482fbb40fffd1490df20dda23c46 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/multimedia/camera')
-rw-r--r--src/multimedia/camera/qcamera.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/multimedia/camera/qcamera.h b/src/multimedia/camera/qcamera.h
index 7d7063650..180760728 100644
--- a/src/multimedia/camera/qcamera.h
+++ b/src/multimedia/camera/qcamera.h
@@ -257,9 +257,15 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QCamera::LockTypes)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
+QT_WARNING_DISABLE_GCC("-Wfloat-equal")
+
Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator==(const QCamera::FrameRateRange &r1, const QCamera::FrameRateRange &r2) Q_DECL_NOTHROW
{ return r1.minimumFrameRate == r2.minimumFrameRate && r1.maximumFrameRate == r2.maximumFrameRate; }
+QT_WARNING_POP
+
Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator!=(const QCamera::FrameRateRange &r1, const QCamera::FrameRateRange &r2) Q_DECL_NOTHROW
{ return !(r1 == r2); }