summaryrefslogtreecommitdiffstats
path: root/src/server/events/Delta.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-18 01:22:18 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 01:22:18 -0400
commit3af246bb3291d8568f6d110884fa55ee5fd20221 (patch)
tree434ac316050356e4db379ba8305b75285b17bbba /src/server/events/Delta.cpp
parent44381dbda9dbf8d20894789fe8e3ea941b70a1d0 (diff)
downloadingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.gz
ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.bz2
ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.zip
Avoid "else" after "return", "break", and "continue"
Diffstat (limited to 'src/server/events/Delta.cpp')
-rw-r--r--src/server/events/Delta.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 2c6a50c8..88826a23 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -155,12 +155,15 @@ get_file_node(LilvWorld* lworld, const URIs& uris, const Atom& value)
{
if (value.type() == uris.atom_Path) {
return lilv_new_file_uri(lworld, nullptr, value.ptr<char>());
- } else if (uris.forge.is_uri(value)) {
+ }
+
+ if (uris.forge.is_uri(value)) {
const std::string str = uris.forge.str(value, false);
if (str.substr(0, 5) == "file:") {
return lilv_new_uri(lworld, value.ptr<char>());
}
}
+
return nullptr;
}
@@ -205,9 +208,9 @@ Delta::pre_process(PreProcessContext& ctx)
if ((_preset = block->save_preset(_subject, _properties))) {
return Event::pre_process_done(Status::SUCCESS);
- } else {
- return Event::pre_process_done(Status::FAILURE);
}
+
+ return Event::pre_process_done(Status::FAILURE);
}
std::lock_guard<Store::Mutex> lock(_engine.store()->mutex());