@@ -44,8 +44,8 @@ int ConvertSecondsToTicks(float seconds, int resolution,
44
44
45
45
if (remainingSeconds <= timeForSegment)
46
46
{
47
- totalTicks += ( int ) (remainingSeconds * previousBPM /
48
- SECONDS_PER_MINUTE * resolution);
47
+ totalTicks += static_cast < int > (remainingSeconds * previousBPM /
48
+ SECONDS_PER_MINUTE * resolution);
49
49
50
50
return totalTicks;
51
51
}
@@ -56,8 +56,8 @@ int ConvertSecondsToTicks(float seconds, int resolution,
56
56
previousBPM = value / 1000 ;
57
57
}
58
58
59
- totalTicks +=
60
- ( int )(remainingSeconds * previousBPM / SECONDS_PER_MINUTE * resolution);
59
+ totalTicks += static_cast < int >(remainingSeconds * previousBPM /
60
+ SECONDS_PER_MINUTE * resolution);
61
61
62
62
return totalTicks;
63
63
}
@@ -161,7 +161,7 @@ extern "C"
161
161
162
162
PACKAGE_API float ConvertTickToPosition (int tick, int resolution)
163
163
{
164
- return tick / ( float ) resolution;
164
+ return tick / static_cast < float >( resolution) ;
165
165
}
166
166
167
167
/* *
@@ -176,7 +176,7 @@ extern "C"
176
176
PACKAGE_API bool IsOnTheBeat (int bpm, float currentTime,
177
177
float delta = 0 .05f )
178
178
{
179
- auto beatInterval = SECONDS_PER_MINUTE / ( float ) bpm;
179
+ auto beatInterval = SECONDS_PER_MINUTE / static_cast < float >( bpm) ;
180
180
181
181
auto beatFraction = currentTime / beatInterval;
182
182
@@ -197,7 +197,8 @@ extern "C"
197
197
198
198
PACKAGE_API int RoundUpToTheNearestMultiplier (int value, int multiplier)
199
199
{
200
- return (int )std::ceil ((float )value / multiplier) * multiplier;
200
+ return static_cast <int >(
201
+ std::ceil (static_cast <float >(value) / multiplier) * multiplier);
201
202
}
202
203
203
204
/* *
0 commit comments