1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

AU: Fixed some missing case warnings in the hosting code

This commit is contained in:
ed 2020-03-17 10:09:02 +00:00
parent 722a1403af
commit 67ccd6d255

View file

@ -1448,28 +1448,16 @@ public:
|| info.unit == kAudioUnitParameterUnit_Boolean);
bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean;
String label;
switch (info.unit)
auto label = [info] () -> String
{
case kAudioUnitParameterUnit_Percent:
label = "%";
break;
case kAudioUnitParameterUnit_Seconds:
label = "s";
break;
case kAudioUnitParameterUnit_Hertz:
label = "Hz";
break;
case kAudioUnitParameterUnit_Decibels:
label = "dB";
break;
case kAudioUnitParameterUnit_Milliseconds:
label = "ms";
break;
default:
break;
}
if (info.unit == kAudioUnitParameterUnit_Percent) return "%";
if (info.unit == kAudioUnitParameterUnit_Seconds) return "s";
if (info.unit == kAudioUnitParameterUnit_Hertz) return "Hz";
if (info.unit == kAudioUnitParameterUnit_Decibels) return "dB";
if (info.unit == kAudioUnitParameterUnit_Milliseconds) return "ms";
return {};
}();
auto* parameter = new AUInstanceParameter (*this,
ids[i],
@ -1830,6 +1818,7 @@ private:
break;
case kAudioUnitEvent_PropertyChange:
default:
if (event.mArgument.mProperty.mPropertyID == kAudioUnitProperty_ParameterList)
{