Fix warnings about uninitialized variables - qrgba64_p.h
In function 'QRgba64 rgbBlend(QRgba64, QRgba64, uint)':
error: 'blend.QRgba64::rgba' is used uninitialized in this function [-Werror=uninitialized]
qrgba64_p.h:246:13: note: 'blend' was declared here
QRgba64 blend;
Change-Id: I7b263f863281c51c7d8099704f2cffcc7e1a07df
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
bb10
parent
07685355b5
commit
772f56c3cf
|
|
@ -266,10 +266,10 @@ inline QRgba64 rgbBlend(QRgba64 d, QRgba64 s, uint rgbAlpha)
|
|||
const int mr = qRed(rgbAlpha);
|
||||
const int mg = qGreen(rgbAlpha);
|
||||
const int mb = qBlue(rgbAlpha);
|
||||
blend.setRed (qt_div_255(s.red() * mr + d.red() * (255 - mr)));
|
||||
blend.setGreen(qt_div_255(s.green() * mg + d.green() * (255 - mg)));
|
||||
blend.setBlue (qt_div_255(s.blue() * mb + d.blue() * (255 - mb)));
|
||||
blend.setAlpha(s.alpha());
|
||||
blend = qRgba64(qt_div_255(s.red() * mr + d.red() * (255 - mr)),
|
||||
qt_div_255(s.green() * mg + d.green() * (255 - mg)),
|
||||
qt_div_255(s.blue() * mb + d.blue() * (255 - mb)),
|
||||
s.alpha());
|
||||
#endif
|
||||
return blend;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue