##// END OF EJS Templates
Fix warning about uninitialized variable...
Miikka Heikkinen -
r2580:a20cc56483ba
parent child
Show More
@@ -36,14 +36,14 PolarDomain::~PolarDomain()
36 void PolarDomain::setSize(const QSizeF &size)
36 void PolarDomain::setSize(const QSizeF &size)
37 {
37 {
38 Q_ASSERT(size.width() == size.height());
38 Q_ASSERT(size.width() == size.height());
39 m_radius = size.height() / 2;
39 m_radius = size.height() / 2.0;
40 m_center = QPointF(m_radius, m_radius);
40 m_center = QPointF(m_radius, m_radius);
41 AbstractDomain::setSize(size);
41 AbstractDomain::setSize(size);
42 }
42 }
43
43
44 QPointF PolarDomain::calculateGeometryPoint(const QPointF &point, bool &ok) const
44 QPointF PolarDomain::calculateGeometryPoint(const QPointF &point, bool &ok) const
45 {
45 {
46 qreal r;
46 qreal r = 0.0;
47 qreal a = toAngularCoordinate(point.x(), ok);
47 qreal a = toAngularCoordinate(point.x(), ok);
48 if (ok)
48 if (ok)
49 r = toRadialCoordinate(point.y(), ok);
49 r = toRadialCoordinate(point.y(), ok);
@@ -60,8 +60,8 QVector<QPointF> PolarDomain::calculateGeometryPoints(const QList<QPointF> &vect
60 QVector<QPointF> result;
60 QVector<QPointF> result;
61 result.resize(vector.count());
61 result.resize(vector.count());
62 bool ok;
62 bool ok;
63 qreal r;
63 qreal r = 0.0;
64 qreal a;
64 qreal a = 0.0;
65
65
66 for (int i = 0; i < vector.count(); ++i) {
66 for (int i = 0; i < vector.count(); ++i) {
67 a = toAngularCoordinate(vector[i].x(), ok);
67 a = toAngularCoordinate(vector[i].x(), ok);
General Comments 0
You need to be logged in to leave comments. Login now