diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-06 07:25:10 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-06 08:55:40 (GMT) |
commit | abb62219db97cc77da16a9b12aa833bdcf8ae476 (patch) | |
tree | e66a4b644a7586d17036dd9c4122e23f5d30a34e /src/gui/painting/qbrush.cpp | |
parent | 90bc27ebe4dc59c3966ba9b3b18fa209e24afd7d (diff) | |
download | Qt-abb62219db97cc77da16a9b12aa833bdcf8ae476.zip Qt-abb62219db97cc77da16a9b12aa833bdcf8ae476.tar.gz Qt-abb62219db97cc77da16a9b12aa833bdcf8ae476.tar.bz2 |
Get rid of double conversions and arithmetic when qreal is float.
Task-number: QT-4624
Reviewed-by: Kim
Diffstat (limited to 'src/gui/painting/qbrush.cpp')
-rw-r--r-- | src/gui/painting/qbrush.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 811f3ae..d557ea5 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1785,7 +1785,7 @@ static QPointF qt_radial_gradient_adapt_focal_point(const QPointF ¢er, // We have a one pixel buffer zone to avoid numerical instability on the // circle border //### this is hacky because technically we should adjust based on current matrix - const qreal compensated_radius = radius - radius * 0.001; + const qreal compensated_radius = radius - radius * qreal(0.001); QLineF line(center, focalPoint); if (line.length() > (compensated_radius)) line.setLength(compensated_radius); |