diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h index 692c29c996..81fc9eee62 100644 --- a/src/gui/math3d/qgenericmatrix.h +++ b/src/gui/math3d/qgenericmatrix.h @@ -219,6 +219,9 @@ Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator* return *this; } +QT_WARNING_PUSH +QT_WARNING_DISABLE_FLOAT_COMPARE + template Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator==(const QGenericMatrix& other) const { @@ -233,14 +236,11 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator==(const QGenericMatr template Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator!=(const QGenericMatrix& other) const { - for (int row = 0; row < M; ++row) - for (int col = 0; col < N; ++col) { - if (m[col][row] != other.m[col][row]) - return true; - } - return false; + return !(*this == other); } +QT_WARNING_POP + template Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator/=(T divisor) {