diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-11-16 14:06:42 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-11-18 00:30:41 +0000 |
commit | 1378e7af1de3c0133e277ec3832ccd72e7286e67 (patch) | |
tree | afbfffdec2482f0eae13262e7b091e075cf1feeb /src/gui/painting | |
parent | f29b6943f0a3b535309a383c41711de05f22eb54 (diff) |
qdrawhelper.cpp: Fix constexpr build with MSVC 2015 Update 1
error C2397: conversion from 'uint' to 'uchar' requires a narrowing conversion
Change-Id: Ic1b9e0a78b2faa5a0ae4e6de33ab2ee4b654af5f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 5c1cd8adef..52843fa113 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -379,9 +379,9 @@ static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uin template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutRGB() { return QPixelLayout{ - redWidth<Format>(), redShift<Format>(), - greenWidth<Format>(), greenShift<Format>(), - blueWidth<Format>(), blueShift<Format>(), + uchar(redWidth<Format>()), uchar(redShift<Format>()), + uchar(greenWidth<Format>()), uchar(greenShift<Format>()), + uchar(blueWidth<Format>()), uchar(blueShift<Format>()), 0, 0, false, bitsPerPixel<Format>(), convertToRGB32<Format>, @@ -394,10 +394,10 @@ template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixe template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutARGBPM() { return QPixelLayout{ - redWidth<Format>(), redShift<Format>(), - greenWidth<Format>(), greenShift<Format>(), - blueWidth<Format>(), blueShift<Format>(), - alphaWidth<Format>(), alphaShift<Format>(), + uchar(redWidth<Format>()), uchar(redShift<Format>()), + uchar(greenWidth<Format>()), uchar(greenShift<Format>()), + uchar(blueWidth<Format>()), uchar(blueShift<Format>()), + uchar(alphaWidth<Format>()), uchar(alphaShift<Format>()), true, bitsPerPixel<Format>(), convertARGBPMToARGB32PM<Format>, convertARGBPMFromARGB32PM<Format>, |