From 5ee6703c5038069d64f302ca2887f0571b17e42f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 4 Nov 2009 21:32:02 +0000 Subject: Remove orphan cruft. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2210 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/ClientStore.cpp | 22 ++-------------------- src/client/ClientStore.hpp | 5 +---- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 54f33006..57004d7d 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -38,8 +38,6 @@ ClientStore::ClientStore(SharedPtr engine, SharedPtr object) (*this)[object->path()] = object; signal_new_object.emit(object); - -#if 0 - resolve_property_orphans(parent); - resolve_orphans(parent); - - SharedPtr port = PtrCast(object); - if (port) - resolve_connection_orphans(port); -#endif - - } else { - //add_orphan(object); } } else { (*this)[object->path()] = object; @@ -128,7 +114,6 @@ ClientStore::remove_object(const Path& path) assert((*i).second->path() == path); SharedPtr result = PtrCast((*i).second); assert(result); - //erase(i); iterator descendants_end = find_descendants_end(i); SharedPtr removed = yank(i, descendants_end); @@ -322,7 +307,6 @@ ClientStore::put(const URI& uri, const Resource::Properties& properties) } else { SharedPtr n(new NodeModel(p->second.get_uri(), path)); n->set_properties(properties); - //add_plugin_orphan(n); add_object(n); } } else { @@ -456,7 +440,7 @@ ClientStore::connection_patch(const Path& src_port_path, const Path& dst_port_pa bool -ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_path, bool add_orphan) +ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_path) { SharedPtr src_port = PtrCast(object(src_port_path)); SharedPtr dst_port = PtrCast(object(dst_port_path)); @@ -475,8 +459,6 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_ patch->add_connection(cm); return true; - } else if (add_orphan) { - //add_connection_orphan(make_pair(src_port_path, dst_port_path)); } return false; @@ -486,7 +468,7 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_ void ClientStore::connect(const Path& src_port_path, const Path& dst_port_path) { - attempt_connection(src_port_path, dst_port_path, true); + attempt_connection(src_port_path, dst_port_path); } diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp index 53cb4a59..f58f5d16 100644 --- a/src/client/ClientStore.hpp +++ b/src/client/ClientStore.hpp @@ -81,7 +81,6 @@ public: sigc::signal< void, SharedPtr > signal_new_plugin; private: - void add(Shared::GraphObject* o) { throw; } void add_object(SharedPtr object); @@ -99,9 +98,7 @@ private: void clear_patch(const Raul::Path& path); void activity(const Raul::Path& path); - bool attempt_connection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path, bool add_orphan=false); - - bool _handle_orphans; + bool attempt_connection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); SharedPtr _engine; SharedPtr _emitter; -- cgit v1.2.1