diff --git a/src/3rdparty/qcustomplot/qcustomplot.cpp b/src/3rdparty/qcustomplot/qcustomplot.cpp index 673ec52a..3dd3660e 100644 --- a/src/3rdparty/qcustomplot/qcustomplot.cpp +++ b/src/3rdparty/qcustomplot/qcustomplot.cpp @@ -15330,7 +15330,7 @@ void QCustomPlot::processRectSelection(QRect rect, QMouseEvent *event) if (!potentialSelections.isEmpty()) { auto it = potentialSelections.begin(); - auto last = --potentialSelections.end(); + const auto last = std::prev(potentialSelections.end()); while (it != last) // erase all except last element it = potentialSelections.erase(it); } @@ -16337,7 +16337,7 @@ void QCPColorGradient::updateColorBuffer() } else // position is in between stops (or on an intermediate stop), interpolate color { QMap::const_iterator high = it; - QMap::const_iterator low = --it; + QMap::const_iterator low = std::prev(it); double t = (position-low.key())/(high.key()-low.key()); // interpolation factor 0..1 switch (mColorInterpolation) {