From e80baa41db344e2800ab54d638a4e9b69aa86374 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 19:35:53 +0100 Subject: Cleanup: Merge branches with identical bodies --- src/server/events/CreatePort.cpp | 4 +--- src/server/events/Delta.cpp | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/server') diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 04e9bf22..d0dcbaf3 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -90,9 +90,7 @@ CreatePort::CreatePort(Engine& engine, bool CreatePort::pre_process(PreProcessContext&) { - if (_port_type == PortType::UNKNOWN) { - return Event::pre_process_done(Status::UNKNOWN_TYPE, _path); - } else if (!_flow) { + if (_port_type == PortType::UNKNOWN || !_flow) { return Event::pre_process_done(Status::UNKNOWN_TYPE, _path); } else if (_path.is_root()) { return Event::pre_process_done(Status::BAD_URI, _path); diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 4e4887c5..31f55306 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -184,9 +184,8 @@ Delta::pre_process(PreProcessContext& ctx) // Get "prototype" for preset (node to save state for) const auto p = _properties.find(uris.lv2_prototype); - if (p == _properties.end()) { - return Event::pre_process_done(Status::BAD_REQUEST, _subject); - } else if (!_engine.world().forge().is_uri(p->second)) { + if (p == _properties.end() || + !_engine.world().forge().is_uri(p->second)) { return Event::pre_process_done(Status::BAD_REQUEST, _subject); } -- cgit v1.2.1