@@ -44,8 +44,8 @@ int ConvertSecondsToTicks(float seconds, int resolution,
4444
4545 if (remainingSeconds <= timeForSegment)
4646 {
47- totalTicks += ( int ) (remainingSeconds * previousBPM /
48- SECONDS_PER_MINUTE * resolution);
47+ totalTicks += static_cast < int > (remainingSeconds * previousBPM /
48+ SECONDS_PER_MINUTE * resolution);
4949
5050 return totalTicks;
5151 }
@@ -56,8 +56,8 @@ int ConvertSecondsToTicks(float seconds, int resolution,
5656 previousBPM = value / 1000 ;
5757 }
5858
59- totalTicks +=
60- ( int )(remainingSeconds * previousBPM / SECONDS_PER_MINUTE * resolution);
59+ totalTicks += static_cast < int >(remainingSeconds * previousBPM /
60+ SECONDS_PER_MINUTE * resolution);
6161
6262 return totalTicks;
6363}
@@ -161,7 +161,7 @@ extern "C"
161161
162162 PACKAGE_API float ConvertTickToPosition (int tick, int resolution)
163163 {
164- return tick / ( float ) resolution;
164+ return tick / static_cast < float >( resolution) ;
165165 }
166166
167167 /* *
@@ -176,7 +176,7 @@ extern "C"
176176 PACKAGE_API bool IsOnTheBeat (int bpm, float currentTime,
177177 float delta = 0 .05f )
178178 {
179- auto beatInterval = SECONDS_PER_MINUTE / ( float ) bpm;
179+ auto beatInterval = SECONDS_PER_MINUTE / static_cast < float >( bpm) ;
180180
181181 auto beatFraction = currentTime / beatInterval;
182182
@@ -197,7 +197,8 @@ extern "C"
197197
198198 PACKAGE_API int RoundUpToTheNearestMultiplier (int value, int multiplier)
199199 {
200- return (int )std::ceil ((float )value / multiplier) * multiplier;
200+ return static_cast <int >(
201+ std::ceil (static_cast <float >(value) / multiplier) * multiplier);
201202 }
202203
203204 /* *
0 commit comments