diff options
author | David Robillard <d@drobilla.net> | 2020-12-14 21:25:19 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-14 22:04:29 +0100 |
commit | 3669e06dd20d43d30bf89ac29e9055e0725b3564 (patch) | |
tree | 6086002971126dba88aa762aa1d487069395a137 /src/gui/NodeModule.cpp | |
parent | 6d82745afdeff69ace846e0c10bf95b3362e1c03 (diff) | |
download | ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.tar.gz ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.tar.bz2 ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.zip |
Fix unnecessary parameter copying overhead
Diffstat (limited to 'src/gui/NodeModule.cpp')
-rw-r--r-- | src/gui/NodeModule.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index e09a3479..daa8df41 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -53,8 +53,8 @@ using client::PortModel; namespace gui { -NodeModule::NodeModule(GraphCanvas& canvas, - std::shared_ptr<const BlockModel> block) +NodeModule::NodeModule(GraphCanvas& canvas, + const std::shared_ptr<const BlockModel>& block) : Ganv::Module(canvas, block->path().symbol(), 0, 0, true) , _block(block) , _gui_widget(nullptr) @@ -137,9 +137,9 @@ NodeModule::show_menu(GdkEventButton* ev) } NodeModule* -NodeModule::create(GraphCanvas& canvas, - std::shared_ptr<const BlockModel> block, - bool human) +NodeModule::create(GraphCanvas& canvas, + const std::shared_ptr<const BlockModel>& block, + bool human) { auto graph = std::dynamic_pointer_cast<const GraphModel>(block); @@ -308,7 +308,7 @@ NodeModule::rename() } void -NodeModule::new_port_view(std::shared_ptr<const PortModel> port) +NodeModule::new_port_view(const std::shared_ptr<const PortModel>& port) { Port::create(app(), *this, port); @@ -322,7 +322,7 @@ NodeModule::new_port_view(std::shared_ptr<const PortModel> port) } Port* -NodeModule::port(std::shared_ptr<const PortModel> model) +NodeModule::port(const std::shared_ptr<const PortModel>& model) { for (auto* p : *this) { auto* const port = dynamic_cast<Port*>(p); @@ -334,7 +334,7 @@ NodeModule::port(std::shared_ptr<const PortModel> model) } void -NodeModule::delete_port_view(std::shared_ptr<const PortModel> model) +NodeModule::delete_port_view(const std::shared_ptr<const PortModel>& model) { Port* const p = port(model); |