diff --git a/src/GUI/gearratiograph.cpp b/src/GUI/gearratiograph.cpp index 566be717..b482ce8c 100644 --- a/src/GUI/gearratiograph.cpp +++ b/src/GUI/gearratiograph.cpp @@ -60,7 +60,7 @@ QList GearRatioGraph::loadData(const Data &data) qreal GearRatioGraph::top() const { - qreal key, val; + qreal key = NAN, val = NAN; for (QMap::const_iterator it = _map.constBegin(); it != _map.constEnd(); ++it) { diff --git a/src/GUI/gearratiographitem.cpp b/src/GUI/gearratiographitem.cpp index deab7983..64a10d82 100644 --- a/src/GUI/gearratiographitem.cpp +++ b/src/GUI/gearratiographitem.cpp @@ -5,7 +5,7 @@ GearRatioGraphItem::GearRatioGraphItem(const Graph &graph, GraphType type, QGraphicsItem *parent) : GraphItem(graph, type, parent) { - qreal val; + qreal val = NAN; for (int j = 1; j < graph.size(); j++) { const GraphPoint &p = graph.at(j);