diff options
author | David Robillard <d@drobilla.net> | 2012-08-14 21:37:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-14 21:37:20 +0000 |
commit | 76b602f1f834cb2c255848c5ba887b3d7c47171a (patch) | |
tree | cbe6588c70f2df4384231d9cbdfd06fb0aa7e45f /src/server/events/Disconnect.cpp | |
parent | a8312be2d849b73ff0acc80a226095bcfee3556c (diff) | |
download | ingen-76b602f1f834cb2c255848c5ba887b3d7c47171a.tar.gz ingen-76b602f1f834cb2c255848c5ba887b3d7c47171a.tar.bz2 ingen-76b602f1f834cb2c255848c5ba887b3d7c47171a.zip |
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
Diffstat (limited to 'src/server/events/Disconnect.cpp')
-rw-r--r-- | src/server/events/Disconnect.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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 <glibmm/thread.h> +#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<PortImpl*>(_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<PortImpl*>(_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(); |