summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PortController.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-11 11:10:35 +0000
committerDavid Robillard <d@drobilla.net>2006-09-11 11:10:35 +0000
commitb15864870d34a1188eda93ad215734275037278e (patch)
tree224a1669a29091ea4198425d4a002e448cde8b30 /src/progs/ingenuity/PortController.cpp
parent22bf43352ddfc48452d776f10ad4d12161255049 (diff)
downloadingen-b15864870d34a1188eda93ad215734275037278e.tar.gz
ingen-b15864870d34a1188eda93ad215734275037278e.tar.bz2
ingen-b15864870d34a1188eda93ad215734275037278e.zip
Switched homebrew CountedPtr to boost::shared_ptr.
Factories for patch windows, controller. Robustness updated in many places. Tons of cleanups, rewrites, bugfixes, etc. git-svn-id: http://svn.drobilla.net/lad/ingen@128 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PortController.cpp')
-rw-r--r--src/progs/ingenuity/PortController.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/progs/ingenuity/PortController.cpp b/src/progs/ingenuity/PortController.cpp
index 6a23169f..167cb594 100644
--- a/src/progs/ingenuity/PortController.cpp
+++ b/src/progs/ingenuity/PortController.cpp
@@ -34,9 +34,6 @@ PortController::PortController(CountedPtr<PortModel> model)
{
assert(model);
assert(model->parent());
- assert(model->controller() == NULL);
-
- model->set_controller(this);
}
@@ -44,8 +41,8 @@ void
PortController::destroy()
{
assert(m_model->parent());
- NodeController* parent = (NodeController*)m_model->parent()->controller();
- assert(parent != NULL);
+ CountedPtr<NodeController> parent = PtrCast<NodeController>(m_model->parent()->controller());
+ assert(parent);
parent->remove_port(path(), false);
}
@@ -73,7 +70,7 @@ PortController::create_module(OmFlowCanvas* canvas)
m_module = new OmPortModule(canvas, this, x, y);
- if (CountedPtr<PatchModel>(port_model()->parent())) {
+ if (PtrCast<PatchModel>(port_model()->parent())) {
if (m_patch_port)
delete m_patch_port;