1
0
mirror of https://github.com/RPCS3/soundtouch.git synced 2024-09-19 16:01:37 +02: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:
Rémi Verschelde 2020-04-28 10:48:45 +02:00
parent a046b6971d
commit fe15975a21

View File

@ -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++)