diff options
-rw-r--r-- | src/gui/painting/qrgba64.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h index a3ae0c9b14..2c8f8fa8c4 100644 --- a/src/gui/painting/qrgba64.h +++ b/src/gui/painting/qrgba64.h @@ -64,26 +64,14 @@ class QRgba64 { #endif }; - // No constructors are allowed in C++98, since this needs to be usable in a union. - // We however require one for constexprs in C++11/C++14 -#ifdef Q_COMPILER_CONSTEXPR explicit Q_ALWAYS_INLINE Q_DECL_CONSTEXPR QRgba64(quint64 c) : rgba(c) { } -#endif public: -#ifdef Q_COMPILER_CONSTEXPR - Q_ALWAYS_INLINE Q_DECL_CONSTEXPR QRgba64() : rgba(0) { } -#endif + QRgba64() = default; Q_DECL_CONSTEXPR static QRgba64 fromRgba64(quint64 c) { -#ifdef Q_COMPILER_CONSTEXPR return QRgba64(c); -#else - QRgba64 rgba64; - rgba64.rgba = c; - return rgba64; -#endif } Q_DECL_CONSTEXPR static QRgba64 fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha) |