From fb5976038162d93d60c7f76376bbb4df38e83ba9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 22 Sep 2017 00:02:16 -0700 Subject: 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 --- src/gui/math3d/qmatrix4x4.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/math3d/qmatrix4x4.h') diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 4db96d07c0..97df11a8bd 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -859,8 +859,8 @@ inline QPointF operator*(const QPointF& point, const QMatrix4x4& matrix) { float xin, yin; float x, y, w; - xin = point.x(); - yin = point.y(); + xin = float(point.x()); + yin = float(point.y()); x = xin * matrix.m[0][0] + yin * matrix.m[0][1] + matrix.m[0][3]; @@ -1094,7 +1094,7 @@ inline float *QMatrix4x4::data() inline void QMatrix4x4::viewport(const QRectF &rect) { - viewport(rect.x(), rect.y(), rect.width(), rect.height()); + viewport(float(rect.x()), float(rect.y()), float(rect.width()), float(rect.height())); } QT_WARNING_POP -- cgit v1.2.3