Fix C++14 compilation in QRgba64
QRgba64 has Q_DECL_RELAXED_CONSTEXPR that builds a QRgba64, but it has no constructor that can be used in a constexpr. Change-Id: Ia032b65151243d071440c05479e8f2549c8b9503 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
This commit is contained in:
parent
fd76e02e95
commit
77c0c1ca65
@ -54,7 +54,12 @@ public:
|
||||
// When c++11 is mandatory, we can add all but a copy constructor.
|
||||
Q_DECL_RELAXED_CONSTEXPR static QRgba64 fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha)
|
||||
{
|
||||
QRgba64 rgba64;
|
||||
QRgba64 rgba64
|
||||
#ifdef Q_COMPILER_UNIFORM_INIT
|
||||
= {}
|
||||
#endif
|
||||
;
|
||||
|
||||
rgba64.c.red = red;
|
||||
rgba64.c.green = green;
|
||||
rgba64.c.blue = blue;
|
||||
@ -63,7 +68,11 @@ public:
|
||||
}
|
||||
Q_DECL_RELAXED_CONSTEXPR static QRgba64 fromRgba64(quint64 c)
|
||||
{
|
||||
QRgba64 rgba64;
|
||||
QRgba64 rgba64
|
||||
#ifdef Q_COMPILER_UNIFORM_INIT
|
||||
= {}
|
||||
#endif
|
||||
;
|
||||
rgba64.rgba = c;
|
||||
return rgba64;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user