From 7a32ff33d439054eae1c9b8ec10570f932b4bd3a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2022 18:42:31 -0600 Subject: [PATCH] handle compiler stupidity with early return --- .../launch_control_xl/launch_control_xl.cc | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index a59686df38..7687907198 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -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) {