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 <thiago.macieira@intel.com>bb10
parent
4f99f87578
commit
be83b626d7
|
|
@ -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,
|
||||
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 + UnusedFieldWidth
|
||||
TotalFieldWidthByOffsets = UnusedField + int(UnusedFieldWidth)
|
||||
};
|
||||
|
||||
static_assert(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));
|
||||
|
|
|
|||
Loading…
Reference in New Issue