summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 19:35:53 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commite80baa41db344e2800ab54d638a4e9b69aa86374 (patch)
tree0b337b4714f2ea59b8c525779adbee430314c50a /src/server
parent4257d61b3622b1fe0ed8d67d14c6b204661a82d3 (diff)
downloadingen-e80baa41db344e2800ab54d638a4e9b69aa86374.tar.gz
ingen-e80baa41db344e2800ab54d638a4e9b69aa86374.tar.bz2
ingen-e80baa41db344e2800ab54d638a4e9b69aa86374.zip
Cleanup: Merge branches with identical bodies
Diffstat (limited to 'src/server')
-rw-r--r--src/server/events/CreatePort.cpp4
-rw-r--r--src/server/events/Delta.cpp5
2 files changed, 3 insertions, 6 deletions
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);
}