summaryrefslogtreecommitdiffstats
path: root/src/plugins/common/evr/evrvideowindowcontrol.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-06-17 15:35:05 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-08-08 09:19:32 +0000
commit11c4ad2c8a39819c9359341ef0145984b9ac16d0 (patch)
tree7f418e5cfef57d0aca2aef9d031678f6ed36aec3 /src/plugins/common/evr/evrvideowindowcontrol.h
parent1dca8d87a1317d2a69384e4cff8d486a4b12e432 (diff)
QAudioHelpers: fix C++20 -Werror,-Wdeprecated-enum-float-conversion
Says Clang 10.0.0 -std=c++20: qaudiohelpers.cpp:71:44: error: arithmetic between enumeration type 'QAudioHelperInternal::signedVersion<unsigned char>::(anonymous enum at /home/marc/Qt/qt5/qtmultimedia/src/multimedia/audio/qaudiohelpers.cpp:63:5)' and floating-point type 'double' is deprecated [-Werror,-Wdeprecated-enum-float-conversion] pDst[i] = signedVersion<T>::offset + ((typename signedVersion<T>::TS)(pSrc[i] - signedVersion<T>::offset) * factor); ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by turning the enum { offset } into a static constexpr int instead. Manual conflict resolutions: - extended the fix to the Qt5-only quint{16,32} specializations which are missing from the Qt 6 code. For the quint32 code, chose uint as decltype(offset), because 0x8000'0000 is not a proper value for int, and the subtraction for which offset is used doesn't promote its arguents to int, like for quint{8,16}, but stays in uint space, so an uint offset is suitable. Task-number: QTBUG-104172 Change-Id: I92a22583fc5e1fc524364b64701aa8d416b82671 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit 94d43085b3f3327b2bf2d644c5f984391f608d3a) Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/plugins/common/evr/evrvideowindowcontrol.h')
0 files changed, 0 insertions, 0 deletions