diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2022-01-08 16:04:11 +0000 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2022-11-23 01:02:25 +0000 |
commit | 69592805810d57743d8d825da85b3b84ea6e8c49 (patch) | |
tree | 2879968895a676f2ff7a77a82eba13abb92a1439 /ui/qt | |
parent | ea7bec688ac1cb24b78b14165a6d924bcc4540de (diff) |
QCustomPlot: Fix Clang Warnings
qcustomplot.cpp:34001:37: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:34001:37: warning: The right operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
(ported from commit a0328bdb0373bda83a7b63900090871ddda38af5)
qcustomplot.cpp:26643:9: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:27752:11: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:27779:11: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:34087:7: warning: 2nd function call argument is an uninitialized value [core.CallAndMessage]
(ported from commit 075ee9138a1d5671d0873b05f28b3e2c86bc9558)
qcustomplot.cpp:22400:17: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:22400:17: warning: The right operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35170:17: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35170:17: warning: The right operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
(ported from commit 6fd41888049b8b1e780b2fbe0e86f0ac7865523e)
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/widgets/qcustomplot.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/qt/widgets/qcustomplot.cpp b/ui/qt/widgets/qcustomplot.cpp index 8200ff88f9..67b7e5c16f 100644 --- a/ui/qt/widgets/qcustomplot.cpp +++ b/ui/qt/widgets/qcustomplot.cpp @@ -22439,7 +22439,7 @@ double QCPGraph::pointDistance(const QPointF &pixelPoint, QCPGraphDataContainer: // calculate minimum distances to graph data points and find closestData iterator: double minDistSqr = (std::numeric_limits<double>::max)(); // determine which key range comes into question, taking selection tolerance around pos into account: - double posKeyMin, posKeyMax, dummy; + double posKeyMin = 0.0, posKeyMax = 0.0, dummy; pixelsToCoords(pixelPoint-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy); pixelsToCoords(pixelPoint+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, dummy); if (posKeyMin > posKeyMax) @@ -26681,7 +26681,7 @@ double QCPColorMap::selectTest(const QPointF &pos, bool onlySelectable, QVariant if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint()) || mParentPlot->interactions().testFlag(QCP::iSelectPlottablesBeyondAxisRect)) { - double posKey, posValue; + double posKey = 0.0, posValue = 0.0; pixelsToCoords(pos, posKey, posValue); if (mMapData->keyRange().contains(posKey) && mMapData->valueRange().contains(posValue)) { @@ -27790,7 +27790,7 @@ double QCPFinancial::candlestickSelectTest(const QPointF &pos, const QCPFinancia // determine whether pos is in open-close-box: QCPRange boxKeyRange(it->key-mWidth*0.5, it->key+mWidth*0.5); QCPRange boxValueRange(it->close, it->open); - double posKey, posValue; + double posKey = 0.0, posValue = 0.0; pixelsToCoords(pos, posKey, posValue); if (boxKeyRange.contains(posKey) && boxValueRange.contains(posValue)) // is in open-close-box { @@ -27817,7 +27817,7 @@ double QCPFinancial::candlestickSelectTest(const QPointF &pos, const QCPFinancia // determine whether pos is in open-close-box: QCPRange boxKeyRange(it->key-mWidth*0.5, it->key+mWidth*0.5); QCPRange boxValueRange(it->close, it->open); - double posKey, posValue; + double posKey = 0.0, posValue = 0.0; pixelsToCoords(pos, posKey, posValue); if (boxKeyRange.contains(posKey) && boxValueRange.contains(posValue)) // is in open-close-box { @@ -34038,7 +34038,7 @@ void QCPPolarAxisAngular::mouseMoveEvent(QMouseEvent *event, const QPointF &star { doReplot = true; double angleCoordStart, radiusCoordStart; - double angleCoord, radiusCoord; + double angleCoord = 0.0, radiusCoord = 0.0; pixelToCoord(startPos, angleCoordStart, radiusCoordStart); pixelToCoord(event->pos(), angleCoord, radiusCoord); double diff = angleCoordStart - angleCoord; @@ -34125,7 +34125,7 @@ void QCPPolarAxisAngular::wheelEvent(QWheelEvent *event) const double wheelSteps = delta/120.0; // a single step delta is +/-120 usually if (mRangeZoom) { - double angleCoord, radiusCoord; + double angleCoord = 0.0, radiusCoord = 0.0; pixelToCoord(pos, angleCoord, radiusCoord); scaleRange(qPow(mRangeZoomFactor, wheelSteps), angleCoord); } @@ -35207,7 +35207,7 @@ double QCPPolarGraph::pointDistance(const QPointF &pixelPoint, QCPGraphDataConta // calculate minimum distances to graph data points and find closestData iterator: double minDistSqr = (std::numeric_limits<double>::max)(); // determine which key range comes into question, taking selection tolerance around pos into account: - double posKeyMin, posKeyMax, dummy; + double posKeyMin = 0.0, posKeyMax = 0.0, dummy; pixelsToCoords(pixelPoint-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy); pixelsToCoords(pixelPoint+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, dummy); if (posKeyMin > posKeyMax) |