From 3af246bb3291d8568f6d110884fa55ee5fd20221 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 18 Aug 2022 01:22:18 -0400 Subject: Avoid "else" after "return", "break", and "continue" --- src/server/events/Delta.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/server/events/Delta.cpp') 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()); - } 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()); } } + 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 lock(_engine.store()->mutex()); -- cgit v1.2.1