aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-09-27 18:17:47 +0200
committerDavid Robillard <d@drobilla.net>2020-09-27 18:17:47 +0200
commit9e46d4a8323e9a91480631980a984700b76a09bd (patch)
treebca7eff6274406c79e430917f7d1729e7dad773d /plugins
parent9b9ca021d6401097d32d96d27de6f906a0252109 (diff)
downloadlv2-9e46d4a8323e9a91480631980a984700b76a09bd.tar.xz
Don't use else after return
Diffstat (limited to 'plugins')
-rw-r--r--plugins/eg-params.lv2/state_map.h5
-rw-r--r--plugins/eg-sampler.lv2/uris.h12
2 files changed, 13 insertions, 4 deletions
diff --git a/plugins/eg-params.lv2/state_map.h b/plugins/eg-params.lv2/state_map.h
index 740f0af..9e7b63e 100644
--- a/plugins/eg-params.lv2/state_map.h
+++ b/plugins/eg-params.lv2/state_map.h
@@ -36,9 +36,12 @@ state_map_cmp(const void* a, const void* b)
const StateMapItem* kb = (const StateMapItem*)b;
if (ka->urid < kb->urid) {
return -1;
- } else if (kb->urid < ka->urid) {
+ }
+
+ if (kb->urid < ka->urid) {
return 1;
}
+
return 0;
}
diff --git a/plugins/eg-sampler.lv2/uris.h b/plugins/eg-sampler.lv2/uris.h
index fd80c3f..57e5754 100644
--- a/plugins/eg-sampler.lv2/uris.h
+++ b/plugins/eg-sampler.lv2/uris.h
@@ -127,10 +127,14 @@ read_set_file(const SamplerURIs* uris,
if (!property) {
fprintf(stderr, "Malformed set message has no body.\n");
return NULL;
- } else if (property->type != uris->atom_URID) {
+ }
+
+ if (property->type != uris->atom_URID) {
fprintf(stderr, "Malformed set message has non-URID property.\n");
return NULL;
- } else if (((const LV2_Atom_URID*)property)->body != uris->eg_sample) {
+ }
+
+ if (((const LV2_Atom_URID*)property)->body != uris->eg_sample) {
fprintf(stderr, "Set message for unknown property.\n");
return NULL;
}
@@ -141,7 +145,9 @@ read_set_file(const SamplerURIs* uris,
if (!value) {
fprintf(stderr, "Malformed set message has no value.\n");
return NULL;
- } else if (value->type != uris->atom_Path) {
+ }
+
+ if (value->type != uris->atom_Path) {
fprintf(stderr, "Set message value is not a Path.\n");
return NULL;
}