From 76b602f1f834cb2c255848c5ba887b3d7c47171a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 14 Aug 2012 21:37:20 +0000 Subject: Replace use of old Raul Table stuff with std::map. Move most Store functionality into Ingen::Store and eliminate EngineStore. Much cleaner delete and move implementations. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4696 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/Disconnect.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/server/events/Disconnect.cpp') diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 7823a709..1726846a 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -18,6 +18,7 @@ #include +#include "ingen/Store.hpp" #include "raul/Maid.hpp" #include "raul/Path.hpp" #include "raul/log.hpp" @@ -27,7 +28,6 @@ #include "DuplexPort.hpp" #include "EdgeImpl.hpp" #include "Engine.hpp" -#include "EngineStore.hpp" #include "InputPort.hpp" #include "OutputPort.hpp" #include "PatchImpl.hpp" @@ -113,7 +113,7 @@ Disconnect::Impl::Impl(Engine& e, bool Disconnect::pre_process() { - Glib::RWLock::WriterLock lock(_engine.engine_store()->lock()); + Glib::RWLock::WriterLock lock(_engine.store()->lock()); if (_tail_path.parent().parent() != _head_path.parent().parent() && _tail_path.parent() != _head_path.parent().parent() @@ -121,15 +121,16 @@ Disconnect::pre_process() return Event::pre_process_done(PARENT_DIFFERS, _head_path); } - PortImpl* tail = _engine.engine_store()->find_port(_tail_path); - PortImpl* head = _engine.engine_store()->find_port(_head_path); - + PortImpl* tail = dynamic_cast(_engine.store()->get(_tail_path)); if (!tail) { return Event::pre_process_done(PORT_NOT_FOUND, _tail_path); - } else if (!head) { - return Event::pre_process_done(PORT_NOT_FOUND, _head_path); } + PortImpl* head = dynamic_cast(_engine.store()->get(_head_path)); + 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(); -- cgit v1.2.1