summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolormatrix_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-12 14:14:02 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-14 15:52:58 +0200
commit6f0df02d002356625f10683ef84da7685d92a2c4 (patch)
tree46713209af459ebda534c3404f48c5f5c80ba3f8 /src/gui/painting/qcolormatrix_p.h
parent44cce1a2ea9dadd8b2de93f40de34269dda703c0 (diff)
Replace Qt CONSTEXPR defines with constexpr
Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/gui/painting/qcolormatrix_p.h')
-rw-r--r--src/gui/painting/qcolormatrix_p.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qcolormatrix_p.h b/src/gui/painting/qcolormatrix_p.h
index 749aad3b2c..87a61ab219 100644
--- a/src/gui/painting/qcolormatrix_p.h
+++ b/src/gui/painting/qcolormatrix_p.h
@@ -62,8 +62,8 @@ class QColorVector
{
public:
QColorVector() = default;
- Q_DECL_CONSTEXPR QColorVector(float x, float y, float z) : x(x), y(y), z(z) { }
- explicit Q_DECL_CONSTEXPR QColorVector(const QPointF &chr) // from XY chromaticity
+ constexpr QColorVector(float x, float y, float z) : x(x), y(y), z(z) { }
+ explicit constexpr QColorVector(const QPointF &chr) // from XY chromaticity
: x(chr.x() / chr.y())
, y(1.0f)
, z((1.0 - chr.x() - chr.y()) / chr.y())
@@ -92,10 +92,10 @@ public:
}
// Common whitepoints:
- static Q_DECL_CONSTEXPR QPointF D50Chromaticity() { return QPointF(0.34567, 0.35850); }
- static Q_DECL_CONSTEXPR QPointF D65Chromaticity() { return QPointF(0.31271, 0.32902); }
- static Q_DECL_CONSTEXPR QColorVector D50() { return QColorVector(D50Chromaticity()); }
- static Q_DECL_CONSTEXPR QColorVector D65() { return QColorVector(D65Chromaticity()); }
+ static constexpr QPointF D50Chromaticity() { return QPointF(0.34567, 0.35850); }
+ static constexpr QPointF D65Chromaticity() { return QPointF(0.31271, 0.32902); }
+ static constexpr QColorVector D50() { return QColorVector(D50Chromaticity()); }
+ static constexpr QColorVector D65() { return QColorVector(D65Chromaticity()); }
};
inline bool operator==(const QColorVector &v1, const QColorVector &v2)