summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-14 16:16:15 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-04-15 08:57:37 (GMT)
commit4626232ff040ce0e66e8cdf5ceb7d725c04a4823 (patch)
tree404d0ffd75bb6e8f32990a4d748bc8c2845c6b79 /src/gui
parentafb3848e0abe0cd2355e7ee7319fd904288e4636 (diff)
downloadQt-4626232ff040ce0e66e8cdf5ceb7d725c04a4823.zip
Qt-4626232ff040ce0e66e8cdf5ceb7d725c04a4823.tar.gz
Qt-4626232ff040ce0e66e8cdf5ceb7d725c04a4823.tar.bz2
Fixes warning about potential use of uninitialized value
Reviewed-by: bnilsen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qtransform.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index fa808d0..39e429d 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1715,13 +1715,12 @@ QRect QTransform::mapRect(const QRect &rect) const
return QRect(x, y, w, h);
} else if (t < TxProject) {
// see mapToPolygon for explanations of the algorithm.
- qreal x0 = 0, y0 = 0;
- qreal x, y;
- MAP(rect.left(), rect.top(), x0, y0);
- qreal xmin = x0;
- qreal ymin = y0;
- qreal xmax = x0;
- qreal ymax = y0;
+ qreal x = 0, y = 0;
+ MAP(rect.left(), rect.top(), x, y);
+ qreal xmin = x;
+ qreal ymin = y;
+ qreal xmax = x;
+ qreal ymax = y;
MAP(rect.right() + 1, rect.top(), x, y);
xmin = qMin(xmin, x);
ymin = qMin(ymin, y);
@@ -1782,13 +1781,12 @@ QRectF QTransform::mapRect(const QRectF &rect) const
}
return QRectF(x, y, w, h);
} else if (t < TxProject) {
- qreal x0 = 0, y0 = 0;
- qreal x, y;
- MAP(rect.x(), rect.y(), x0, y0);
- qreal xmin = x0;
- qreal ymin = y0;
- qreal xmax = x0;
- qreal ymax = y0;
+ qreal x = 0, y = 0;
+ MAP(rect.x(), rect.y(), x, y);
+ qreal xmin = x;
+ qreal ymin = y;
+ qreal xmax = x;
+ qreal ymax = y;
MAP(rect.x() + rect.width(), rect.y(), x, y);
xmin = qMin(xmin, x);
ymin = qMin(ymin, y);