diff options
author | David Robillard <d@drobilla.net> | 2010-02-25 03:40:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-25 03:40:39 +0000 |
commit | e22984efe9b82ab006494aea93814a592cd44ece (patch) | |
tree | a9b1b317515b9fda4947d4fb9c2bc460e07b0c32 /src/shared | |
parent | 5d87212114e2df68a086eeb55829a70bed0940d3 (diff) | |
download | ingen-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/shared')
-rw-r--r-- | src/shared/Builder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp index 820a26b3..0cc4e980 100644 --- a/src/shared/Builder.cpp +++ b/src/shared/Builder.cpp @@ -85,7 +85,7 @@ Builder::connect(SharedPtr<const GraphObject> object) if (patch) { for (Patch::Connections::const_iterator i = patch->connections().begin(); i != patch->connections().end(); ++i) { - _interface.connect((*i)->src_port_path(), (*i)->dst_port_path()); + _interface.connect(i->second->src_port_path(), i->second->dst_port_path()); } return; } |