summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 14:03:03 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 16:03:16 (GMT)
commitd45b0ee01402c2474652f6afd2cd1e8564d8071c (patch)
tree70b4ef24a45d204552d61a4982db269738b7af06 /src
parent37a8926fd8aa1971a4d0a8b04facf63c631b9367 (diff)
downloadQt-d45b0ee01402c2474652f6afd2cd1e8564d8071c.zip
Qt-d45b0ee01402c2474652f6afd2cd1e8564d8071c.tar.gz
Qt-d45b0ee01402c2474652f6afd2cd1e8564d8071c.tar.bz2
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
Diffstat (limited to 'src')
-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 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)