summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchPortModule.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-03 18:14:32 +0000
committerDavid Robillard <d@drobilla.net>2011-06-03 18:14:32 +0000
commit30e15b2f613d93eae8a4a122583dd0a16b1ab609 (patch)
tree9ab219bc86ffde3d571ccdee18794acbe8dbc747 /src/gui/PatchPortModule.hpp
parente15a1ca67583535193e3e2b13ff006d93a7dcf14 (diff)
downloadingen-30e15b2f613d93eae8a4a122583dd0a16b1ab609.tar.gz
ingen-30e15b2f613d93eae8a4a122583dd0a16b1ab609.tar.bz2
ingen-30e15b2f613d93eae8a4a122583dd0a16b1ab609.zip
Remove use of boost::enable_shared_from_this<Canvas>.
Instead, just store a pointer to the containing canvas in Items, since it should not be possible for an Item to outlive its containing Canvas anyway. Shrinks Item memory overhead a tad and gives a minor performance boost as an added bonus. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3354 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchPortModule.hpp')
-rw-r--r--src/gui/PatchPortModule.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/PatchPortModule.hpp b/src/gui/PatchPortModule.hpp
index 7cdc3653..9334c48f 100644
--- a/src/gui/PatchPortModule.hpp
+++ b/src/gui/PatchPortModule.hpp
@@ -50,9 +50,9 @@ class PatchPortModule : public FlowCanvas::Module
{
public:
static boost::shared_ptr<PatchPortModule> create(
- boost::shared_ptr<PatchCanvas> canvas,
- SharedPtr<const PortModel> model,
- bool human);
+ PatchCanvas& canvas,
+ SharedPtr<const PortModel> model,
+ bool human);
virtual void store_location();
void show_human_names(bool b);
@@ -62,8 +62,8 @@ public:
SharedPtr<const PortModel> port() const { return _model; }
protected:
- PatchPortModule(boost::shared_ptr<PatchCanvas> canvas,
- SharedPtr<const PortModel> model);
+ PatchPortModule(PatchCanvas& canvas,
+ SharedPtr<const PortModel> model);
void create_menu();
void set_selected(bool b);