From 975088963680561a165cc6c195c1971bb3d8a9aa Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:08:05 +0100 Subject: [PATCH] Add missing constness. --- include/qwtble/Quantiles.h | 3 ++- src/Picker.cpp | 2 +- src/Picker.h | 2 +- src/Quantiles.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/qwtble/Quantiles.h b/include/qwtble/Quantiles.h index 9b0a104..7d8e8ac 100644 --- a/include/qwtble/Quantiles.h +++ b/include/qwtble/Quantiles.h @@ -64,7 +64,8 @@ struct QWTBLE_EXPORT Quantiles double interval); static double calculateStdDev(int count, double EX, double EX2); void setQuantiles(const QVector& values); - std::tuple calculateEXAndEX2(const QVector& values); + std::tuple calculateEXAndEX2( + const QVector& values) const; enum PlotInfo : int { diff --git a/src/Picker.cpp b/src/Picker.cpp index 2b61d59..3457292 100644 --- a/src/Picker.cpp +++ b/src/Picker.cpp @@ -23,7 +23,7 @@ Picker::Picker(QWidget* parent) : QwtPlotPicker(parent) setTrackerFont(actualFont); } -int Picker::getAreaOfMouse() +int Picker::getAreaOfMouse() const { const auto x = lround(invTransform(trackerPosition()).x()); return static_cast(x); diff --git a/src/Picker.h b/src/Picker.h index 30b58af..2a8cc8f 100644 --- a/src/Picker.h +++ b/src/Picker.h @@ -9,7 +9,7 @@ class Picker : public QwtPlotPicker public: explicit Picker(QWidget* parent); - int getAreaOfMouse(); + int getAreaOfMouse() const; bool getMouseInWidget() const; diff --git a/src/Quantiles.cpp b/src/Quantiles.cpp index af22157..53b2024 100644 --- a/src/Quantiles.cpp +++ b/src/Quantiles.cpp @@ -64,7 +64,7 @@ void Quantiles::setQuantiles(const QVector& values) } std::tuple Quantiles::calculateEXAndEX2( - const QVector& values) + const QVector& values) const { double EX = 0; double EX2 = 0;