From 37ec8d59b349b9b735b58134a72e7372f36345dc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 16 Dec 2020 16:48:43 +0100 Subject: Simplify degenerate switches --- plugins/eg-scope.lv2/examploscope_ui.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'plugins/eg-scope.lv2/examploscope_ui.c') diff --git a/plugins/eg-scope.lv2/examploscope_ui.c b/plugins/eg-scope.lv2/examploscope_ui.c index ce0000c..33f1b0a 100644 --- a/plugins/eg-scope.lv2/examploscope_ui.c +++ b/plugins/eg-scope.lv2/examploscope_ui.c @@ -667,10 +667,5 @@ LV2_SYMBOL_EXPORT const LV2UI_Descriptor* lv2ui_descriptor(uint32_t index) { - switch (index) { - case 0: - return &descriptor; - default: - return NULL; - } + return index == 0 ? &descriptor : NULL; } -- cgit v1.2.1