From 155f4c422735cdb7400d9290dc6defca8f580a1b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 30 Jul 2012 16:54:03 +0000 Subject: Shrink events. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4574 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/Disconnect.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/server/events/Disconnect.cpp') diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 00e4b374..e797c6a7 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -50,8 +50,6 @@ Disconnect::Disconnect(Engine& engine, , _tail_path(tail_path) , _head_path(head_path) , _patch(NULL) - , _tail(NULL) - , _head(NULL) , _impl(NULL) , _compiled_patch(NULL) { @@ -122,17 +120,17 @@ Disconnect::pre_process() return Event::pre_process_done(PARENT_DIFFERS, _head_path); } - _tail = _engine.engine_store()->find_port(_tail_path); - _head = _engine.engine_store()->find_port(_head_path); + PortImpl* tail = _engine.engine_store()->find_port(_tail_path); + PortImpl* head = _engine.engine_store()->find_port(_head_path); - if (!_tail) { + if (!tail) { return Event::pre_process_done(PORT_NOT_FOUND, _tail_path); - } else if (!_head) { + } else if (!head) { return Event::pre_process_done(PORT_NOT_FOUND, _head_path); } - NodeImpl* const src_node = _tail->parent_node(); - NodeImpl* const dst_node = _head->parent_node(); + NodeImpl* const src_node = tail->parent_node(); + NodeImpl* const dst_node = head->parent_node(); if (src_node->parent_patch() != dst_node->parent_patch()) { // Edge to a patch port from inside the patch @@ -152,7 +150,7 @@ Disconnect::pre_process() assert(_patch); - if (!_patch->has_edge(_tail, _head)) { + if (!_patch->has_edge(tail, head)) { return Event::pre_process_done(NOT_FOUND, _head_path); } @@ -162,8 +160,8 @@ Disconnect::pre_process() _impl = new Impl(_engine, _patch, - dynamic_cast(_tail), - dynamic_cast(_head)); + dynamic_cast(tail), + dynamic_cast(head)); if (_patch->enabled()) _compiled_patch = _patch->compile(); @@ -217,7 +215,7 @@ void Disconnect::post_process() { if (!respond()) { - _engine.broadcaster()->disconnect(_tail->path(), _head->path()); + _engine.broadcaster()->disconnect(_tail_path, _head_path); } delete _impl; -- cgit v1.2.1