summaryrefslogtreecommitdiffstats
path: root/src/engine/events/DisconnectAll.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-25 03:40:39 +0000
committerDavid Robillard <d@drobilla.net>2010-02-25 03:40:39 +0000
commite22984efe9b82ab006494aea93814a592cd44ece (patch)
treea9b1b317515b9fda4947d4fb9c2bc460e07b0c32 /src/engine/events/DisconnectAll.cpp
parent5d87212114e2df68a086eeb55829a70bed0940d3 (diff)
downloadingen-e22984efe9b82ab006494aea93814a592cd44ece.tar.gz
ingen-e22984efe9b82ab006494aea93814a592cd44ece.tar.bz2
ingen-e22984efe9b82ab006494aea93814a592cd44ece.zip
Store patch connections in a map using a lexicographic <Port*,Port*> key for
fast (logarathmic) connection searching. Replaces all O(num_connections) searches with O(lg(num_connections)) searches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2491 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/DisconnectAll.cpp')
-rw-r--r--src/engine/events/DisconnectAll.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/events/DisconnectAll.cpp b/src/engine/events/DisconnectAll.cpp
index 38ed7102..7b10b3f4 100644
--- a/src/engine/events/DisconnectAll.cpp
+++ b/src/engine/events/DisconnectAll.cpp
@@ -112,7 +112,7 @@ DisconnectAll::pre_process()
if (_node) {
for (PatchImpl::Connections::const_iterator i = _parent->connections().begin();
i != _parent->connections().end(); ++i) {
- ConnectionImpl* c = (ConnectionImpl*)i->get();
+ ConnectionImpl* c = (ConnectionImpl*)i->second.get();
const bool reconnect_input = !_deleting || (c->dst_port()->parent_node() != _node);
if ((c->src_port()->parent_node() == _node || c->dst_port()->parent_node() == _node)
&& !c->pending_disconnection()) {
@@ -126,7 +126,7 @@ DisconnectAll::pre_process()
} else { // _port
for (PatchImpl::Connections::const_iterator i = _parent->connections().begin();
i != _parent->connections().end(); ++i) {
- ConnectionImpl* c = (ConnectionImpl*)i->get();
+ ConnectionImpl* c = (ConnectionImpl*)i->second.get();
const bool reconnect_input = !_deleting || (c->dst_port()->parent_node() != _node);
if ((c->src_port() == _port || c->dst_port() == _port) && !c->pending_disconnection()) {
Disconnect* ev = new Disconnect(_engine,