From be83b626d736c3b8e58b3e22a02774acbc2fdb10 Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Wed, 11 Sep 2019 09:01:10 +0200 Subject: QPixelFormat: Fix warning about mixing different enums warning: C5054: operator '+': deprecated between enumerations of different types Pick-to: 5.15 Change-Id: If111b076914667fb149e62e051f52f408db9a338 Reviewed-by: Thiago Macieira --- src/gui/kernel/qpixelformat.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h index b48ed40812..2fee7c1a9a 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) }; static_assert(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets)); -- cgit v1.2.3