mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-09 20:33:03 +01:00
BPMDetect: Make conversion from size_t to int explicit
Fixes warning C4267 on MSVC. This assumes that `beats.size()` should never overflow `int` - if that could happen, the API should likely be changed to handle it gracefully.
This commit is contained in:
parent
a046b6971d
commit
fe15975a21
@ -561,7 +561,7 @@ float BPMDetect::getBpm()
|
||||
/// \return number of beats in the arrays.
|
||||
int BPMDetect::getBeats(float *pos, float *values, int max_num)
|
||||
{
|
||||
int num = beats.size();
|
||||
int num = (int)beats.size();
|
||||
if ((!pos) || (!values)) return num; // pos or values NULL, return just size
|
||||
|
||||
for (int i = 0; (i < num) && (i < max_num); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user