diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2020-04-08 14:10:14 -0300 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2020-04-09 09:39:05 -0300 |
commit | 7bd13d3f98a6f1f9cf7aed122fd2f301fbae9d62 (patch) | |
tree | 53f568263e040e4442514a39518a533c9ed1a11e | |
parent | 0721c05771e89364023309fa252d70bdfafab2b4 (diff) |
Fix clang warning about mixing || and |
|| was definitely wrong. Even | would be wrong.
../qmultimedia_common/../qmultimedia_common/mockcameraflashcontrol.h:62:22: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
return (mode || (QCameraExposure::FlashAuto | QCameraExposure::FlashOff | QCameraExposure::FlashOn |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: Ibdc95e9af7bd456a94ecfffd1603e74da919abbc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
-rw-r--r-- | tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h b/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h index daa9f28b6..96e2ebc52 100644 --- a/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h +++ b/tests/auto/unit/qmultimedia_common/mockcameraflashcontrol.h @@ -59,9 +59,9 @@ public: bool isFlashModeSupported(QCameraExposure::FlashModes mode) const { - return (mode || (QCameraExposure::FlashAuto | QCameraExposure::FlashOff | QCameraExposure::FlashOn | - QCameraExposure::FlashFill |QCameraExposure::FlashTorch |QCameraExposure::FlashSlowSyncFrontCurtain | - QCameraExposure::FlashRedEyeReduction)); + return (mode & (QCameraExposure::FlashAuto | QCameraExposure::FlashOff | QCameraExposure::FlashOn | + QCameraExposure::FlashFill |QCameraExposure::FlashTorch |QCameraExposure::FlashSlowSyncFrontCurtain | + QCameraExposure::FlashRedEyeReduction)); } bool isFlashReady() const |