From 1378e7af1de3c0133e277ec3832ccd72e7286e67 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 16 Nov 2015 14:06:42 -0800 Subject: 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) --- src/gui/painting/qdrawhelper.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/painting') 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 Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutRGB() { return QPixelLayout{ - redWidth(), redShift(), - greenWidth(), greenShift(), - blueWidth(), blueShift(), + uchar(redWidth()), uchar(redShift()), + uchar(greenWidth()), uchar(greenShift()), + uchar(blueWidth()), uchar(blueShift()), 0, 0, false, bitsPerPixel(), convertToRGB32, @@ -394,10 +394,10 @@ template Q_DECL_CONSTEXPR static inline QPixelLayout pixe template Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutARGBPM() { return QPixelLayout{ - redWidth(), redShift(), - greenWidth(), greenShift(), - blueWidth(), blueShift(), - alphaWidth(), alphaShift(), + uchar(redWidth()), uchar(redShift()), + uchar(greenWidth()), uchar(greenShift()), + uchar(blueWidth()), uchar(blueShift()), + uchar(alphaWidth()), uchar(alphaShift()), true, bitsPerPixel(), convertARGBPMToARGB32PM, convertARGBPMFromARGB32PM, -- cgit v1.2.3