From d45b0ee01402c2474652f6afd2cd1e8564d8071c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 11 Aug 2009 16:03:03 +0200 Subject: QPoint comparision operators use qFuzzyIsNull instead of qFuzzyCompare qFuzzyCompare doesn't support 0 as parameter. So this function is pretty useless for QPoint, where coordinates can be zero. Reviewed-by: Harald Fernengel --- src/corelib/tools/qpoint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h index df35eaa..8d653b0 100644 --- a/src/corelib/tools/qpoint.h +++ b/src/corelib/tools/qpoint.h @@ -302,12 +302,12 @@ inline QPointF &QPointF::operator*=(qreal c) inline bool operator==(const QPointF &p1, const QPointF &p2) { - return qFuzzyCompare(p1.xp, p2.xp) && qFuzzyCompare(p1.yp, p2.yp); + return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp); } inline bool operator!=(const QPointF &p1, const QPointF &p2) { - return !qFuzzyCompare(p1.xp, p2.xp) || !qFuzzyCompare(p1.yp, p2.yp); + return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp); } inline const QPointF operator+(const QPointF &p1, const QPointF &p2) -- cgit v0.12