diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 01:22:18 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 01:22:18 -0400 |
commit | 3af246bb3291d8568f6d110884fa55ee5fd20221 (patch) | |
tree | 434ac316050356e4db379ba8305b75285b17bbba /src/server/events/Copy.cpp | |
parent | 44381dbda9dbf8d20894789fe8e3ea941b70a1d0 (diff) | |
download | ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.gz ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.bz2 ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.zip |
Avoid "else" after "return", "break", and "continue"
Diffstat (limited to 'src/server/events/Copy.cpp')
-rw-r--r-- | src/server/events/Copy.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp index 7f92842e..beb5224c 100644 --- a/src/server/events/Copy.cpp +++ b/src/server/events/Copy.cpp @@ -79,19 +79,23 @@ Copy::pre_process(PreProcessContext& ctx) if (uri_is_path(_msg.new_uri)) { // Copy to path within the engine return engine_to_engine(ctx); - } else if (_msg.new_uri.scheme() == "file") { + } + + if (_msg.new_uri.scheme() == "file") { // Copy to filesystem path (i.e. save) return engine_to_filesystem(ctx); - } else { - return Event::pre_process_done(Status::BAD_REQUEST); } - } else if (_msg.old_uri.scheme() == "file") { + + return Event::pre_process_done(Status::BAD_REQUEST); + } + + if (_msg.old_uri.scheme() == "file") { if (uri_is_path(_msg.new_uri)) { return filesystem_to_engine(ctx); - } else { - // Ingen is not your file manager - return Event::pre_process_done(Status::BAD_REQUEST); } + + // Ingen is not your file manager + return Event::pre_process_done(Status::BAD_REQUEST); } return Event::pre_process_done(Status::BAD_URI); |