Explicit cast to int

The value bounds is checked anyway
This commit is contained in:
Paul Fd 2020-03-12 23:47:50 +01:00
parent 9d2526ec6f
commit d09032c44f

View file

@ -256,7 +256,7 @@ void SfizzVstProcessor::processControllerChanges(Vst::IParameterChanges& pc)
switch (id) {
default:
if (id >= kPidMidiCC0 && id <= kPidMidiCCLast) {
int ccNumber = id - kPidMidiCC0;
auto ccNumber = static_cast<int>(id - kPidMidiCC0);
for (uint32 pointIndex = 0; pointIndex < pointCount; ++pointIndex) {
if (vq->getPoint(pointIndex, sampleOffset, value) == kResultTrue)
synth.cc(sampleOffset, ccNumber, fastRound(value * 127.0));