diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-09-22 00:02:16 -0700 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-10-29 10:13:23 +0000 |
commit | fb5976038162d93d60c7f76376bbb4df38e83ba9 (patch) | |
tree | 6ea5ee808422fe7dee70590dd5348961eda0d047 /src/gui/math3d/qvector4d.h | |
parent | 0e0f656f5031585c6b691d80057dfdc00bc48400 (diff) |
Fix GCC -Wfloat-conversion warnings (available since GCC 4.9)
This warning used to be part of -Wconversion, but that generates too
more noise than we're willing to fix now (like conversion from qint64 to
int). The float conversion does trigger for conversion from double to
float, as shown in all the QVectorND uses of float, but more
importantly, it triggers on passing floats to ints.
Change-Id: I69f37f9304f24709a823fffd14e69cfd33f75988
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/math3d/qvector4d.h')
-rw-r--r-- | src/gui/math3d/qvector4d.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h index be373aa806..3f14b41e8e 100644 --- a/src/gui/math3d/qvector4d.h +++ b/src/gui/math3d/qvector4d.h @@ -146,7 +146,7 @@ Q_DECL_CONSTEXPR inline QVector4D::QVector4D(float xpos, float ypos, float zpos, Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPoint& point) : xp(point.x()), yp(point.y()), zp(0.0f), wp(0.0f) {} -Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPointF& point) : xp(point.x()), yp(point.y()), zp(0.0f), wp(0.0f) {} +Q_DECL_CONSTEXPR inline QVector4D::QVector4D(const QPointF& point) : xp(float(point.x())), yp(float(point.y())), zp(0.0f), wp(0.0f) {} inline bool QVector4D::isNull() const { |