diff options
author | Marcel Krems <m.krems@software-vision.eu> | 2019-09-11 09:01:10 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-08-23 14:44:18 +0000 |
commit | efcd98e63cfead293a2a10417223127820116cb8 (patch) | |
tree | 99eb2bc47eb4609da739771c500c645e3dc98e4e /src/gui | |
parent | a5331a5c21ba967d9d7dedfc7e1179474061f580 (diff) |
QPixelFormat: Fix warning about mixing different enums
warning: C5054: operator '+': deprecated between enumerations of different types
Change-Id: If111b076914667fb149e62e051f52f408db9a338
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit be83b626d736c3b8e58b3e22a02774acbc2fdb10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qpixelformat.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h index a041a39fc1..79558577c7 100644 --- a/src/gui/kernel/qpixelformat.h +++ b/src/gui/kernel/qpixelformat.h @@ -76,20 +76,20 @@ class QPixelFormat // work around bug in old clang versions: when building webkit // with XCode 4.6 and older this fails compilation, thus cast to int FirstField = ModelField + int(ModelFieldWidth), - SecondField = FirstField + FirstFieldWidth, - ThirdField = SecondField + SecondFieldWidth, - FourthField = ThirdField + ThirdFieldWidth, - FifthField = FourthField + FourthFieldWidth, - AlphaField = FifthField + FifthFieldWidth, - AlphaUsageField = AlphaField + AlphaFieldWidth, - AlphaPositionField = AlphaUsageField + AlphaUsageFieldWidth, - PremulField = AlphaPositionField + AlphaPositionFieldWidth, - TypeInterpretationField = PremulField + PremulFieldWidth, - ByteOrderField = TypeInterpretationField + TypeInterpretationFieldWidth, - SubEnumField = ByteOrderField + ByteOrderFieldWidth, - UnusedField = SubEnumField + SubEnumFieldWidth, - - TotalFieldWidthByOffsets = UnusedField + UnusedFieldWidth + SecondField = FirstField + int(FirstFieldWidth), + ThirdField = SecondField + int(SecondFieldWidth), + FourthField = ThirdField + int(ThirdFieldWidth), + FifthField = FourthField + int(FourthFieldWidth), + AlphaField = FifthField + int(FifthFieldWidth), + AlphaUsageField = AlphaField + int(AlphaFieldWidth), + AlphaPositionField = AlphaUsageField + int(AlphaUsageFieldWidth), + PremulField = AlphaPositionField + int(AlphaPositionFieldWidth), + TypeInterpretationField = PremulField + int(PremulFieldWidth), + ByteOrderField = TypeInterpretationField + int(TypeInterpretationFieldWidth), + SubEnumField = ByteOrderField + int(ByteOrderFieldWidth), + UnusedField = SubEnumField + int(SubEnumFieldWidth), + + TotalFieldWidthByOffsets = UnusedField + int(UnusedFieldWidth) }; Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets)); |