diff options
Diffstat (limited to 'src/gui/math3d/qvector2d.h')
-rw-r--r-- | src/gui/math3d/qvector2d.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h index 0098c119ec..bd1d28274c 100644 --- a/src/gui/math3d/qvector2d.h +++ b/src/gui/math3d/qvector2d.h @@ -80,12 +80,7 @@ public: float operator[](int i) const; float length() const; -#ifdef QT_BUILD_GUI_LIB - float lengthSquared() const; -#else - Q_DECL_CONSTEXPR inline float lengthSquared() const - { return xp * xp + yp * yp; } -#endif + float lengthSquared() const; //In Qt 6 convert to inline and constexpr QVector2D normalized() const; void normalize(); @@ -99,12 +94,7 @@ public: QVector2D &operator*=(const QVector2D &vector); QVector2D &operator/=(float divisor); -#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) - static float dotProduct(const QVector2D& v1, const QVector2D& v2); -#else - Q_DECL_CONSTEXPR inline static float dotProduct(const QVector2D& v1, const QVector2D& v2) - { return v1.xp * v2.xp + v1.yp * v2.yp; } -#endif + static float dotProduct(const QVector2D& v1, const QVector2D& v2); //In Qt 6 convert to inline and constexpr Q_DECL_CONSTEXPR friend inline bool operator==(const QVector2D &v1, const QVector2D &v2); Q_DECL_CONSTEXPR friend inline bool operator!=(const QVector2D &v1, const QVector2D &v2); |