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-amp.lv2/amp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'plugins/eg-amp.lv2') diff --git a/plugins/eg-amp.lv2/amp.c b/plugins/eg-amp.lv2/amp.c index c3ba279..77cf83f 100644 --- a/plugins/eg-amp.lv2/amp.c +++ b/plugins/eg-amp.lv2/amp.c @@ -223,8 +223,5 @@ LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index) { - switch (index) { - case 0: return &descriptor; - default: return NULL; - } + return index == 0 ? &descriptor : NULL; } -- cgit v1.2.1