diff options
author | David Robillard <d@drobilla.net> | 2011-06-07 02:44:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-07 02:44:16 +0000 |
commit | d42b83ffe581651886ca0874b6b75dcbb6127aea (patch) | |
tree | 0fd2f18a1c7748fc2f2287cd19d6e546100b6ce3 /src/gui/Port.cpp | |
parent | 92de17413f62e973b21447a6001371ca98e025e0 (diff) | |
download | ingen-d42b83ffe581651886ca0874b6b75dcbb6127aea.tar.gz ingen-d42b83ffe581651886ca0874b6b75dcbb6127aea.tar.bz2 ingen-d42b83ffe581651886ca0874b6b75dcbb6127aea.zip |
Remove use of smart pointers in FlowCanvas entirely.
Since FlowCanvas's containers own their children, there is no real benefit to using smart pointers for objects, though there is overhead. There are no longer any add or remove methods for containers, simply create (new) and destroy (delete) objects and things should work as expected.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3366 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Port.cpp')
-rw-r--r-- | src/gui/Port.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 94b8851e..72c37b12 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -41,10 +41,10 @@ namespace GUI { ArtVpathDash* Port::_dash; SharedPtr<Port> -Port::create(boost::shared_ptr<FlowCanvas::Module> module, - SharedPtr<const PortModel> pm, - bool human_name, - bool flip) +Port::create(FlowCanvas::Module& module, + SharedPtr<const PortModel> pm, + bool human_name, + bool flip) { Glib::ustring label(human_name ? "" : pm->path().symbol()); if (human_name) { @@ -62,10 +62,10 @@ Port::create(boost::shared_ptr<FlowCanvas::Module> module, /** @a flip Make an input port appear as an output port, and vice versa. */ -Port::Port(boost::shared_ptr<FlowCanvas::Module> module, - SharedPtr<const PortModel> pm, - const string& name, - bool flip) +Port::Port(FlowCanvas::Module& module, + SharedPtr<const PortModel> pm, + const string& name, + bool flip) : FlowCanvas::Port(module, name, flip ? (!pm->is_input()) : pm->is_input(), App::instance().configuration()->get_port_color(pm.get())) @@ -73,7 +73,6 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, , _pressed(false) , _flipped(flip) { - assert(module); assert(pm); delete _menu; |