diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2015-03-15 13:52:55 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2015-03-16 06:47:18 +0000 |
commit | 77c0c1ca6505eb66bd75b3766f9a498574822bd1 (patch) | |
tree | 2d2a304782e0992d2b4482cc8f01a5d2eebc8c3a /src/gui/painting | |
parent | fd76e02e9504f829871228c6c8cbdda84701dd3e (diff) |
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>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qrgba64.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h index e3a5bc3754..2ea09e6bd6 100644 --- a/src/gui/painting/qrgba64.h +++ b/src/gui/painting/qrgba64.h @@ -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; } |