diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-08-12 14:14:02 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-08-14 15:52:58 +0200 |
commit | 6f0df02d002356625f10683ef84da7685d92a2c4 (patch) | |
tree | 46713209af459ebda534c3404f48c5f5c80ba3f8 /src/gui/math3d/qquaternion.h | |
parent | 44cce1a2ea9dadd8b2de93f40de34269dda703c0 (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/math3d/qquaternion.h')
-rw-r--r-- | src/gui/math3d/qquaternion.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h index f862e6174c..12d62e8f50 100644 --- a/src/gui/math3d/qquaternion.h +++ b/src/gui/math3d/qquaternion.h @@ -85,7 +85,7 @@ public: void setZ(float z); void setScalar(float scalar); - Q_DECL_CONSTEXPR static inline float dotProduct(const QQuaternion &q1, const QQuaternion &q2); + constexpr static inline float dotProduct(const QQuaternion &q1, const QQuaternion &q2); float length() const; float lengthSquared() const; @@ -197,7 +197,7 @@ inline void QQuaternion::setY(float aY) { yp = aY; } inline void QQuaternion::setZ(float aZ) { zp = aZ; } inline void QQuaternion::setScalar(float aScalar) { wp = aScalar; } -Q_DECL_CONSTEXPR inline float QQuaternion::dotProduct(const QQuaternion &q1, const QQuaternion &q2) +constexpr inline float QQuaternion::dotProduct(const QQuaternion &q1, const QQuaternion &q2) { return q1.wp * q2.wp + q1.xp * q2.xp + q1.yp * q2.yp + q1.zp * q2.zp; } |