Browse Source

Simplify degenerate switches

zrythm_meson
David Robillard 2 years ago
parent
commit
37ec8d59b3
  1. 5
      plugins/eg-amp.lv2/amp.c
  2. 7
      plugins/eg-fifths.lv2/fifths.c
  3. 7
      plugins/eg-metro.lv2/metro.c
  4. 7
      plugins/eg-midigate.lv2/midigate.c
  5. 7
      plugins/eg-sampler.lv2/sampler.c
  6. 7
      plugins/eg-sampler.lv2/sampler_ui.c
  7. 7
      plugins/eg-scope.lv2/examploscope_ui.c

5
plugins/eg-amp.lv2/amp.c

@ -223,8 +223,5 @@ LV2_SYMBOL_EXPORT @@ -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;
}

7
plugins/eg-fifths.lv2/fifths.c

@ -184,10 +184,5 @@ static const LV2_Descriptor descriptor = { @@ -184,10 +184,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;
}

7
plugins/eg-metro.lv2/metro.c

@ -346,10 +346,5 @@ static const LV2_Descriptor descriptor = { @@ -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;
}

7
plugins/eg-midigate.lv2/midigate.c

@ -231,10 +231,5 @@ LV2_SYMBOL_EXPORT @@ -231,10 +231,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;
}

7
plugins/eg-sampler.lv2/sampler.c

@ -594,10 +594,5 @@ static const LV2_Descriptor descriptor = { @@ -594,10 +594,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;
}

7
plugins/eg-sampler.lv2/sampler_ui.c

@ -456,10 +456,5 @@ LV2_SYMBOL_EXPORT @@ -456,10 +456,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;
}

7
plugins/eg-scope.lv2/examploscope_ui.c

@ -667,10 +667,5 @@ LV2_SYMBOL_EXPORT @@ -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;
}

Loading…
Cancel
Save