From 5d1f12438b9fa1d1f64f70ae31d394b70cb088ab Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 16 Dec 2021 22:17:47 +0100 Subject: [PATCH] cleanup: remove 'const constexpr' pairs 'constexpr' implies 'const' since it is a stronger guarantee, so let's remove the redundant 'const'. Signed-off-by: Berthold Stoeger --- commands/command_edit.cpp | 8 ++++---- stats/chartlistmodel.h | 8 ++++---- stats/statsvariables.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index 0617e0e8b..f2f652e54 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -1107,10 +1107,10 @@ static bool same_cylinder_pressure(const cylinder_t &cyl1, const cylinder_t &cyl } // Flags for comparing cylinders -static const constexpr int SAME_TYPE = 1 << 0; -static const constexpr int SAME_SIZE = 1 << 1; -static const constexpr int SAME_PRESS = 1 << 2; -static const constexpr int SAME_GAS = 1 << 3; +static constexpr int SAME_TYPE = 1 << 0; +static constexpr int SAME_SIZE = 1 << 1; +static constexpr int SAME_PRESS = 1 << 2; +static constexpr int SAME_GAS = 1 << 3; static bool same_cylinder_with_flags(const cylinder_t &cyl1, const cylinder_t &cyl2, int sameCylinderFlags) { diff --git a/stats/chartlistmodel.h b/stats/chartlistmodel.h index 70484e0ad..1cabbf99f 100644 --- a/stats/chartlistmodel.h +++ b/stats/chartlistmodel.h @@ -20,10 +20,10 @@ public: // Returns index of selected item int update(const StatsState::ChartList &charts); - static const constexpr int ChartNameRole = Qt::UserRole + 1; - static const constexpr int IsHeaderRole = Qt::UserRole + 2; - static const constexpr int IconRole = Qt::UserRole + 3; - static const constexpr int IconSizeRole = Qt::UserRole + 4; + static constexpr int ChartNameRole = Qt::UserRole + 1; + static constexpr int IsHeaderRole = Qt::UserRole + 2; + static constexpr int IconRole = Qt::UserRole + 3; + static constexpr int IconSizeRole = Qt::UserRole + 4; Q_PROPERTY(int count READ rowCount NOTIFY countChanged) diff --git a/stats/statsvariables.cpp b/stats/statsvariables.cpp index d68022275..3075814b5 100644 --- a/stats/statsvariables.cpp +++ b/stats/statsvariables.cpp @@ -14,7 +14,7 @@ #include #include -static const constexpr double NaN = std::numeric_limits::quiet_NaN(); +static constexpr double NaN = std::numeric_limits::quiet_NaN(); // Typedefs for year / quarter or month binners using year_quarter = std::pair;