From 3afa8264cb8c9922ed61523fdfcd0f23347c2208 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Sat, 8 Jan 2022 13:18:21 +0000 Subject: [PATCH] qcustomsplot: fix Clang Warnings[core.UndefinedBinaryOperatorResult] qcustomplot.cpp:21229:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult] qcustomplot.cpp:21274:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult] qcustomplot.cpp:35323:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult] qcustomplot.cpp:35349:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult] --- ui/qt/widgets/qcustomplot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/qt/widgets/qcustomplot.cpp b/ui/qt/widgets/qcustomplot.cpp index 36d37b9220..b6179b3ba6 100644 --- a/ui/qt/widgets/qcustomplot.cpp +++ b/ui/qt/widgets/qcustomplot.cpp @@ -21224,7 +21224,7 @@ void QCPGraph::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const void QCPGraph::getLines(QVector *lines, const QCPDataRange &dataRange) const { if (!lines) return; - QCPGraphDataContainer::const_iterator begin, end; + QCPGraphDataContainer::const_iterator begin = 0, end = 0; getVisibleDataBounds(begin, end, dataRange); if (begin == end) { @@ -21269,7 +21269,7 @@ void QCPGraph::getScatters(QVector *scatters, const QCPDataRange &dataR QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; scatters->clear(); return; } - QCPGraphDataContainer::const_iterator begin, end; + QCPGraphDataContainer::const_iterator begin = 0, end = 0; getVisibleDataBounds(begin, end, dataRange); if (begin == end) { @@ -35318,7 +35318,7 @@ void QCPPolarGraph::getVisibleDataBounds(QCPGraphDataContainer::const_iterator & void QCPPolarGraph::getLines(QVector *lines, const QCPDataRange &dataRange) const { if (!lines) return; - QCPGraphDataContainer::const_iterator begin, end; + QCPGraphDataContainer::const_iterator begin = 0, end = 0; getVisibleDataBounds(begin, end, dataRange); if (begin == end) { @@ -35344,7 +35344,7 @@ void QCPPolarGraph::getScatters(QVector *scatters, const QCPDataRange & if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (!scatters) return; - QCPGraphDataContainer::const_iterator begin, end; + QCPGraphDataContainer::const_iterator begin = 0, end = 0; getVisibleDataBounds(begin, end, dataRange); if (begin == end) {