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-metro.lv2/metro.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'plugins/eg-metro.lv2') diff --git a/plugins/eg-metro.lv2/metro.c b/plugins/eg-metro.lv2/metro.c index a7231d2..060060c 100644 --- a/plugins/eg-metro.lv2/metro.c +++ b/plugins/eg-metro.lv2/metro.c @@ -346,10 +346,5 @@ static const LV2_Descriptor descriptor = { 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