Closed dimitre closed 10 months ago
What is the warning?
Implicit conversion loses integer precision: 'unsigned long' to 'unsigned int'
it can be supressed by
In general, suppression is a bad idea, better to fix the issue.
The issue is that the ticks member variable is an unsigned long
while the functions work with unsigned int
. I probably used the larger type to ensure there would be plenty of space for very long songs. However when I wrote the rest of the API, I changed to unsigned ints which now clips this upper limit.
Two approaches:
unsigned int
. This will lower the max number of ticks which can be stored internally but wouldn't introduce warnings to existing projects.unsigned long
. This would fix the clipping of the max number of beats, but could introduce warnings in people's projects.UPDATE: Since no one has brought up the issue of not having enough ticks, I'd say 1 would work for now. We can implement 2 if/when that becomes an issue.
Thanks
not sure if its the best way