summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/ClearPatchEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 04:21:18 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 04:21:18 +0000
commitfae7e7519afae5f42836eaaf5e317151ea9c4378 (patch)
treec935a96d005d51517052aa95a8eb42def47b09d2 /src/libs/engine/events/ClearPatchEvent.cpp
parent4675e82dae45a70ee27bf11d10aa6872485c8847 (diff)
downloadingen-fae7e7519afae5f42836eaaf5e317151ea9c4378.tar.gz
ingen-fae7e7519afae5f42836eaaf5e317151ea9c4378.tar.bz2
ingen-fae7e7519afae5f42836eaaf5e317151ea9c4378.zip
Fixed missing symbol in Raul.
Made Raul::List interface and uses thereof less fugly. git-svn-id: http://svn.drobilla.net/lad/ingen@845 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/ClearPatchEvent.cpp')
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index ad35d162..84731d0a 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -51,7 +51,7 @@ ClearPatchEvent::pre_process()
_process = _patch->enabled();
- for (Raul::List<Node*>::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
+ for (List<Node*>::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
(*i)->remove_from_store();
}
#endif
@@ -69,7 +69,7 @@ ClearPatchEvent::execute(ProcessContext& context)
_patch->disable();
cerr << "FIXME: CLEAR PATCH\n";
- //for (Raul::List<Node*>::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
+ //for (List<Node*>::const_iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i)
// (*i)->remove_from_patch();
if (_patch->compiled_patch() != NULL) {
@@ -85,15 +85,16 @@ ClearPatchEvent::post_process()
{
if (_patch != NULL) {
// Delete all nodes
- for (Raul::List<NodeImpl*>::iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i) {
+ for (List<NodeImpl*>::iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i) {
(*i)->deactivate();
delete *i;
}
_patch->nodes().clear();
// Delete all connections
- for (Raul::List<ConnectionImpl*>::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
- delete *i;
+ for (List< SharedPtr<ConnectionImpl> >::iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i)
+ (*i).reset();
+
_patch->connections().clear();
// Restore patch's run state