diff options
author | David Robillard <d@drobilla.net> | 2017-03-26 12:50:58 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-26 17:02:09 +0200 |
commit | fbb4acda313ecfb69dd1e7c2f1f120072fec382d (patch) | |
tree | 564de80858b07e2424d34820a00387d51d7004db /src/server/events | |
parent | cfb016163227560932044b73407ae9dafa54b4ba (diff) | |
download | ingen-fbb4acda313ecfb69dd1e7c2f1f120072fec382d.tar.gz ingen-fbb4acda313ecfb69dd1e7c2f1f120072fec382d.tar.bz2 ingen-fbb4acda313ecfb69dd1e7c2f1f120072fec382d.zip |
Make parent pointer a block since ports can not contain nodes
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/Connect.cpp | 4 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 8 | ||||
-rw-r--r-- | src/server/events/DisconnectAll.cpp | 7 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index c75e56a1..76b7ac41 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -68,8 +68,8 @@ Connect::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::BAD_REQUEST, _head_path); } - BlockImpl* const tail_block = tail_output->parent_block(); - BlockImpl* const head_block = _head->parent_block(); + BlockImpl* const tail_block = tail_output->parent(); + BlockImpl* const head_block = _head->parent(); if (!tail_block || !head_block) { return Event::pre_process_done(Status::PARENT_NOT_FOUND, _head_path); } diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 1411e666..e107c81c 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -67,8 +67,8 @@ Disconnect::Impl::Impl(Engine& e, { ThreadManager::assert_thread(THREAD_PRE_PROCESS); - BlockImpl* const tail_block = _tail->parent_block(); - BlockImpl* const head_block = _head->parent_block(); + BlockImpl* const tail_block = _tail->parent(); + BlockImpl* const head_block = _head->parent(); // Remove tail from head's providers std::set<BlockImpl*>::iterator hp = head_block->providers().find(tail_block); @@ -128,8 +128,8 @@ Disconnect::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::PORT_NOT_FOUND, _head_path); } - BlockImpl* const tail_block = tail->parent_block(); - BlockImpl* const head_block = head->parent_block(); + BlockImpl* const tail_block = tail->parent(); + BlockImpl* const head_block = head->parent(); if (tail_block->parent_graph() != head_block->parent_graph()) { // Arc to a graph port from inside the graph diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index dc9652d9..45fec243 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -113,8 +113,8 @@ DisconnectAll::pre_process(PreProcessContext& ctx) for (const auto& a : _parent->arcs()) { ArcImpl* const arc = (ArcImpl*)a.second.get(); if (_block) { - if (arc->tail()->parent_block() == _block - || arc->head()->parent_block() == _block) { + if (arc->tail()->parent() == _block + || arc->head()->parent() == _block) { to_remove.insert(arc); } } else if (_port) { @@ -147,8 +147,7 @@ DisconnectAll::execute(RunContext& context) { if (_status == Status::SUCCESS) { for (auto& i : _impls) { - i->execute(context, - !_deleting || (i->head()->parent_block() != _block)); + i->execute(context, !_deleting || (i->head()->parent() != _block)); } } |