Make some constants constexpr, mark as float so MSVC doesn't print a warning about a double to float truncation
This commit is contained in:
@@ -26,15 +26,15 @@ namespace StepParity
|
|||||||
|
|
||||||
// 0.1 = 1/16th note at 150bpm. Jacks quicker than this are harder.
|
// 0.1 = 1/16th note at 150bpm. Jacks quicker than this are harder.
|
||||||
// Above this speed, footswitches should be prioritized
|
// Above this speed, footswitches should be prioritized
|
||||||
const float JACK_THRESHOLD = 0.1;
|
constexpr float JACK_THRESHOLD = 0.1f;
|
||||||
// 0.15 = 1/8th at 200bpm, or 3/16th at 150bpm. Below this speed, jumps should be prioritized
|
// 0.15 = 1/8th at 200bpm, or 3/16th at 150bpm. Below this speed, jumps should be prioritized
|
||||||
const float SLOW_BRACKET_THRESHOLD = 0.15;
|
constexpr float SLOW_BRACKET_THRESHOLD = 0.15f;
|
||||||
// 0.2 = 1/8th at 150bpm. Footswitches slower than this are harder.
|
// 0.2 = 1/8th at 150bpm. Footswitches slower than this are harder.
|
||||||
// Below this speed, jacks should be prioritized
|
// Below this speed, jacks should be prioritized
|
||||||
const float SLOW_FOOTSWITCH_THRESHOLD = 0.2;
|
constexpr float SLOW_FOOTSWITCH_THRESHOLD = 0.2f;
|
||||||
// 0.4 = 1/4th at 150bpm. Once a footswitch gets slow enough, though,
|
// 0.4 = 1/4th at 150bpm. Once a footswitch gets slow enough, though,
|
||||||
// just ignore it.
|
// just ignore it.
|
||||||
const float SLOW_FOOTSWITCH_IGNORE = 0.4;
|
constexpr float SLOW_FOOTSWITCH_IGNORE = 0.4f;
|
||||||
|
|
||||||
class StepParityCost
|
class StepParityCost
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -28,13 +28,13 @@ LuaXType( TechCountsCategory );
|
|||||||
|
|
||||||
// 0.176 ~= 1/8th at 175bpm
|
// 0.176 ~= 1/8th at 175bpm
|
||||||
// Anything slower isn't counted as a jack
|
// Anything slower isn't counted as a jack
|
||||||
const float JACK_CUTOFF = 0.176;
|
constexpr float JACK_CUTOFF = 0.176f;
|
||||||
// 0.3 = 1/4th at 200bpm (or 3/16th at 150bpm)
|
// 0.3 = 1/4th at 200bpm (or 3/16th at 150bpm)
|
||||||
// Anything slower isn't counted as a footswitch
|
// Anything slower isn't counted as a footswitch
|
||||||
const float FOOTSWITCH_CUTOFF = 0.3;
|
constexpr float FOOTSWITCH_CUTOFF = 0.3f;
|
||||||
// 0.235 ~= 1/8th at 128bpm
|
// 0.235 ~= 1/8th at 128bpm
|
||||||
// Anything slower isn't counted as a doublestep
|
// Anything slower isn't counted as a doublestep
|
||||||
const float DOUBLESTEP_CUTOFF = 0.235;
|
constexpr float DOUBLESTEP_CUTOFF = 0.235f;
|
||||||
|
|
||||||
// TechCounts methods
|
// TechCounts methods
|
||||||
TechCounts::TechCounts()
|
TechCounts::TechCounts()
|
||||||
|
|||||||
Reference in New Issue
Block a user