handle compiler stupidity with early return
This commit is contained in:
parent
f7b91d577b
commit
7a32ff33d4
@ -1284,20 +1284,20 @@ void LaunchControlXL::set_track_mode (TrackMode mode) {
|
||||
|
||||
LEDColor color_on, color_off;
|
||||
switch(mode) {
|
||||
case TrackMute:
|
||||
color_on = YellowFull;
|
||||
color_off = YellowLow;
|
||||
break;
|
||||
case TrackSolo:
|
||||
color_on = GreenFull;
|
||||
color_off = GreenLow;
|
||||
break;
|
||||
case TrackRecord:
|
||||
color_on = RedFull;
|
||||
color_off = RedLow;
|
||||
break;
|
||||
default:
|
||||
case TrackMute:
|
||||
color_on = YellowFull;
|
||||
color_off = YellowLow;
|
||||
break;
|
||||
case TrackSolo:
|
||||
color_on = GreenFull;
|
||||
color_off = GreenLow;
|
||||
break;
|
||||
case TrackRecord:
|
||||
color_on = RedFull;
|
||||
color_off = RedLow;
|
||||
break;
|
||||
default:
|
||||
return; /* stupid compilers */
|
||||
}
|
||||
|
||||
for ( size_t n = 0 ; n < sizeof (trk_cntrl_btns) / sizeof (trk_cntrl_btns[0]); ++n) {
|
||||
|
Loading…
Reference in New Issue
Block a user