diff options
author | Be <be@mixxx.org> | 2021-09-26 23:33:44 -0500 |
---|---|---|
committer | Be <be@mixxx.org> | 2021-09-26 23:33:44 -0500 |
commit | 4d7bde1d00dd445b47edb46d93709a52bfc5a0fd (patch) | |
tree | 6845c518e40573be7d401db2cca3d2ff6ce988ef | |
parent | 67f35d0d98d4ae4def3d38b7706f2b0aa04e37be (diff) |
built-in effects: use constexpr instead of const
4 files changed, 7 insertions, 7 deletions
diff --git a/src/effects/backends/builtin/autopaneffect.cpp b/src/effects/backends/builtin/autopaneffect.cpp index 02822f6df5..286772e053 100644 --- a/src/effects/backends/builtin/autopaneffect.cpp +++ b/src/effects/backends/builtin/autopaneffect.cpp @@ -6,7 +6,7 @@ #include "util/math.h" #include "util/sample.h" -const float kPositionRampingThreshold = 0.002f; +constexpr float kPositionRampingThreshold = 0.002f; // static QString AutoPanEffect::getId() { diff --git a/src/effects/backends/builtin/balanceeffect.cpp b/src/effects/backends/builtin/balanceeffect.cpp index 1bccd5f028..82227c0da9 100644 --- a/src/effects/backends/builtin/balanceeffect.cpp +++ b/src/effects/backends/builtin/balanceeffect.cpp @@ -3,8 +3,8 @@ #include "util/defs.h" namespace { -const double kMaxCornerHz = 500; -const double kMinCornerHz = 16; +constexpr double kMaxCornerHz = 500; +constexpr double kMinCornerHz = 16; } // anonymous namespace // static diff --git a/src/effects/backends/builtin/filtereffect.cpp b/src/effects/backends/builtin/filtereffect.cpp index 32c70e14ab..c1f606140a 100644 --- a/src/effects/backends/builtin/filtereffect.cpp +++ b/src/effects/backends/builtin/filtereffect.cpp @@ -3,8 +3,8 @@ #include "util/math.h" namespace { -const double kMinCorner = 13; // Hz -const double kMaxCorner = 22050; // Hz +constexpr double kMinCorner = 13; // Hz +constexpr double kMaxCorner = 22050; // Hz } // anonymous namespace // static diff --git a/src/effects/backends/builtin/moogladder4filtereffect.cpp b/src/effects/backends/builtin/moogladder4filtereffect.cpp index 5ee0f4d5bc..018efe7fe1 100644 --- a/src/effects/backends/builtin/moogladder4filtereffect.cpp +++ b/src/effects/backends/builtin/moogladder4filtereffect.cpp @@ -2,8 +2,8 @@ #include "util/math.h" -static const double kMinCorner = 0.0003; // 13 Hz @ 44100 -static const double kMaxCorner = 0.5; // 22050 Hz @ 44100 +static constexpr double kMinCorner = 0.0003; // 13 Hz @ 44100 +static constexpr double kMaxCorner = 0.5; // 22050 Hz @ 44100 // static QString MoogLadder4FilterEffect::getId() { |