From e22984efe9b82ab006494aea93814a592cd44ece Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 25 Feb 2010 03:40:39 +0000 Subject: Store patch connections in a map using a lexicographic 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 --- src/common/interface/Patch.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common/interface/Patch.hpp') diff --git a/src/common/interface/Patch.hpp b/src/common/interface/Patch.hpp index 0817d7c2..f46c1a6d 100644 --- a/src/common/interface/Patch.hpp +++ b/src/common/interface/Patch.hpp @@ -18,6 +18,7 @@ #ifndef INGEN_INTERFACE_PATCH_HPP #define INGEN_INTERFACE_PATCH_HPP +#include #include "raul/SharedPtr.hpp" #include "raul/List.hpp" #include "interface/Node.hpp" @@ -35,7 +36,8 @@ class Connection; class Patch : virtual public Node { public: - typedef Raul::List< SharedPtr > Connections; + typedef std::pair ConnectionsKey; + typedef std::map< ConnectionsKey, SharedPtr > Connections; virtual const Connections& connections() const = 0; -- cgit v1.2.1