summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.cpp
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-07 14:50:23 (GMT)
committerBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-08 08:24:38 (GMT)
commit72f84ad17d0905f91e9d3988bb0f6482df6c6c78 (patch)
treefa1c345ee0d052db81733659f9fcdc161ede0b95 /src/gui/painting/qpainterpath.cpp
parent6fd4a720870775a4d9a645d9000b0259caa74178 (diff)
downloadQt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.zip
Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.gz
Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.bz2
Use qIsFuzzyNull rather than the more expensive qFuzzyCompare
See also fde7f3d03782c801901f511131458d6fcb1021a5 Reviewed-by: Olivier Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r--src/gui/painting/qpainterpath.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 6ae908c..de8969c 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1299,10 +1299,10 @@ static QRectF qt_painterpath_bezier_extrema(const QBezier &b)
qreal bx = QT_BEZIER_B(b, x);
qreal cx = QT_BEZIER_C(b, x);
// specialcase quadratic curves to avoid div by zero
- if (qFuzzyCompare(ax + 1, 1)) {
+ if (qIsFuzzyNull(ax)) {
// linear curves are covered by initialization.
- if (!qFuzzyCompare(bx + 1, 1)) {
+ if (!qIsFuzzyNull(bx)) {
qreal t = -cx / bx;
QT_BEZIER_CHECK_T(b, t);
}
@@ -1329,10 +1329,10 @@ static QRectF qt_painterpath_bezier_extrema(const QBezier &b)
qreal cy = QT_BEZIER_C(b, y);
// specialcase quadratic curves to avoid div by zero
- if (qFuzzyCompare(ay + 1, 1)) {
+ if (qIsFuzzyNull(ay)) {
// linear curves are covered by initialization.
- if (!qFuzzyCompare(by + 1, 1)) {
+ if (!qIsFuzzyNull(by)) {
qreal t = -cy / by;
QT_BEZIER_CHECK_T(b, t);
}