From a20cc56483ba583158176ee3908086ab4978e693 2013-06-14 11:29:41 From: Miikka Heikkinen Date: 2013-06-14 11:29:41 Subject: [PATCH] Fix warning about uninitialized variable Change-Id: Ie4bb39b548622e002258e3e82142f128224332f6 Reviewed-by: Mika Salmela --- diff --git a/src/domain/polardomain.cpp b/src/domain/polardomain.cpp index 718e8d2..9a9a556 100644 --- a/src/domain/polardomain.cpp +++ b/src/domain/polardomain.cpp @@ -36,14 +36,14 @@ PolarDomain::~PolarDomain() void PolarDomain::setSize(const QSizeF &size) { Q_ASSERT(size.width() == size.height()); - m_radius = size.height() / 2; + m_radius = size.height() / 2.0; m_center = QPointF(m_radius, m_radius); AbstractDomain::setSize(size); } QPointF PolarDomain::calculateGeometryPoint(const QPointF &point, bool &ok) const { - qreal r; + qreal r = 0.0; qreal a = toAngularCoordinate(point.x(), ok); if (ok) r = toRadialCoordinate(point.y(), ok); @@ -60,8 +60,8 @@ QVector PolarDomain::calculateGeometryPoints(const QList &vect QVector result; result.resize(vector.count()); bool ok; - qreal r; - qreal a; + qreal r = 0.0; + qreal a = 0.0; for (int i = 0; i < vector.count(); ++i) { a = toAngularCoordinate(vector[i].x(), ok);