diff options
author | David Robillard <d@drobilla.net> | 2011-04-20 03:37:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-20 03:37:59 +0000 |
commit | 9ce6db73368703afbd548ed20b886efcc2c27350 (patch) | |
tree | 0d2fdbe0429f8e021d929fe3001281812107fd89 /src | |
parent | 1119a2c71a5f6b4e23ac0a19784705002ca9cefd (diff) | |
download | ingen-9ce6db73368703afbd548ed20b886efcc2c27350.tar.gz ingen-9ce6db73368703afbd548ed20b886efcc2c27350.tar.bz2 ingen-9ce6db73368703afbd548ed20b886efcc2c27350.zip |
Use std::list for DisconnectAll::_impls.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3180 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/events/DisconnectAll.cpp | 27 | ||||
-rw-r--r-- | src/engine/events/DisconnectAll.hpp | 6 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/engine/events/DisconnectAll.cpp b/src/engine/events/DisconnectAll.cpp index a79969d3..dcfb34ab 100644 --- a/src/engine/events/DisconnectAll.cpp +++ b/src/engine/events/DisconnectAll.cpp @@ -16,22 +16,23 @@ */ #include <boost/format.hpp> + #include "raul/Array.hpp" -#include "raul/List.hpp" #include "raul/Maid.hpp" #include "raul/Path.hpp" + #include "ClientBroadcaster.hpp" #include "ConnectionImpl.hpp" -#include "events/DisconnectAll.hpp" -#include "events/Disconnect.hpp" #include "Engine.hpp" +#include "EngineStore.hpp" #include "InputPort.hpp" #include "NodeImpl.hpp" -#include "EngineStore.hpp" #include "OutputPort.hpp" #include "PatchImpl.hpp" #include "PortImpl.hpp" #include "Request.hpp" +#include "events/Disconnect.hpp" +#include "events/DisconnectAll.hpp" #include "util.hpp" using namespace std; @@ -69,21 +70,18 @@ DisconnectAll::DisconnectAll(Engine& engine, PatchImpl* parent, GraphObjectImpl* DisconnectAll::~DisconnectAll() { - for (Raul::List<Disconnect::Impl*>::iterator i = _disconnect_events.begin(); - i != _disconnect_events.end(); ++i) + for (Impls::iterator i = _impls.begin(); i != _impls.end(); ++i) delete (*i); } void DisconnectAll::remove_connection(ConnectionImpl* c) { - - _disconnect_events.push_back( - new Raul::List<Disconnect::Impl*>::Node( - new Disconnect::Impl(_engine, - _parent, - dynamic_cast<OutputPort*>(c->src_port()), - dynamic_cast<InputPort*>(c->dst_port())))); + _impls.push_back( + new Disconnect::Impl(_engine, + _parent, + dynamic_cast<OutputPort*>(c->src_port()), + dynamic_cast<InputPort*>(c->dst_port()))); } void @@ -153,8 +151,7 @@ DisconnectAll::execute(ProcessContext& context) QueuedEvent::execute(context); if (_error == NO_ERROR) { - for (Raul::List<Disconnect::Impl*>::iterator i = _disconnect_events.begin(); - i != _disconnect_events.end(); ++i) { + for (Impls::iterator i = _impls.begin(); i != _impls.end(); ++i) { (*i)->execute(context, !_deleting || ((*i)->dst_port()->parent_node() != _node)); } diff --git a/src/engine/events/DisconnectAll.hpp b/src/engine/events/DisconnectAll.hpp index 65c9599f..aae6f84d 100644 --- a/src/engine/events/DisconnectAll.hpp +++ b/src/engine/events/DisconnectAll.hpp @@ -18,7 +18,8 @@ #ifndef INGEN_EVENTS_DISCONNECTALL_HPP #define INGEN_EVENTS_DISCONNECTALL_HPP -#include "raul/List.hpp" +#include <list> + #include "raul/Path.hpp" #include "Disconnect.hpp" @@ -77,7 +78,8 @@ private: NodeImpl* _node; PortImpl* _port; - Raul::List<Disconnect::Impl*> _disconnect_events; + typedef std::list<Disconnect::Impl*> Impls; + Impls _impls; CompiledPatch* _compiled_patch; ///< New process order for Patch |