summaryrefslogtreecommitdiffstats
path: root/src/JackDbusDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-07 02:44:16 +0000
committerDavid Robillard <d@drobilla.net>2011-06-07 02:44:16 +0000
commit00f2ad0069fe4e51e40e6a3b3d41f125b67f89cf (patch)
tree1a96d7873a700a05815bde3e3119b7055532d861 /src/JackDbusDriver.cpp
parent9adc6fb021bcde9720a8afcac9a1a87521691fba (diff)
downloadpatchage-00f2ad0069fe4e51e40e6a3b3d41f125b67f89cf.tar.gz
patchage-00f2ad0069fe4e51e40e6a3b3d41f125b67f89cf.tar.bz2
patchage-00f2ad0069fe4e51e40e6a3b3d41f125b67f89cf.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/patchage@3366 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/JackDbusDriver.cpp')
-rw-r--r--src/JackDbusDriver.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp
index 51f71c6..7b43e58 100644
--- a/src/JackDbusDriver.cpp
+++ b/src/JackDbusDriver.cpp
@@ -97,8 +97,7 @@ JackDriver::destroy_all()
for (FlowCanvas::Module::Ports::iterator p = ports.begin(); p != ports.end(); ++p) {
SharedPtr<PatchagePort> port = boost::dynamic_pointer_cast<PatchagePort>(*p);
if (port && (port->type() == JACK_AUDIO || port->type() == JACK_MIDI)) {
- module->remove_port(port);
- port->hide();
+ _app->canvas()->remove_port(port->id());
}
}
@@ -845,8 +844,8 @@ JackDriver::refresh()
bool
JackDriver::connect(
- SharedPtr<PatchagePort> src,
- SharedPtr<PatchagePort> dst)
+ PatchagePort* src,
+ PatchagePort* dst)
{
const char* client1_name;
const char* port1_name;
@@ -874,8 +873,8 @@ JackDriver::connect(
bool
JackDriver::disconnect(
- SharedPtr<PatchagePort> src,
- SharedPtr<PatchagePort> dst)
+ PatchagePort* src,
+ PatchagePort* dst)
{
const char* client1_name;
const char* port1_name;
@@ -1070,7 +1069,7 @@ JackDriver::reset_max_dsp_load()
_max_dsp_load = 0.0;
}
-SharedPtr<PatchagePort>
+PatchagePort*
JackDriver::create_port_view(
Patchage* patchage,
const PortID& id)