summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 16:03:03 +0200
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 18:03:16 +0200
commitd45b0ee01402c2474652f6afd2cd1e8564d8071c (patch)
tree70b4ef24a45d204552d61a4982db269738b7af06
parent37a8926fd8aa1971a4d0a8b04facf63c631b9367 (diff)
downloadqt4-tools-d45b0ee01402c2474652f6afd2cd1e8564d8071c.tar.gz
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
-rw-r--r--src/corelib/tools/qpoint.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index df35eaa839..8d653b07aa 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)