summaryrefslogtreecommitdiffstats
path: root/src/gui/Port.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-14 21:25:19 +0100
committerDavid Robillard <d@drobilla.net>2020-12-14 22:04:29 +0100
commit3669e06dd20d43d30bf89ac29e9055e0725b3564 (patch)
tree6086002971126dba88aa762aa1d487069395a137 /src/gui/Port.cpp
parent6d82745afdeff69ace846e0c10bf95b3362e1c03 (diff)
downloadingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.tar.gz
ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.tar.bz2
ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.zip
Fix unnecessary parameter copying overhead
Diffstat (limited to 'src/gui/Port.cpp')
-rw-r--r--src/gui/Port.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index e7c6b959..062b9936 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -48,21 +48,21 @@ using client::PortModel;
namespace gui {
Port*
-Port::create(App& app,
- Ganv::Module& module,
- std::shared_ptr<const PortModel> pm,
- bool flip)
+Port::create(App& app,
+ Ganv::Module& module,
+ const std::shared_ptr<const PortModel>& pm,
+ bool flip)
{
return new Port(app, module, pm, port_label(app, pm), flip);
}
/** @param flip Make an input port appear as an output port, and vice versa.
*/
-Port::Port(App& app,
- Ganv::Module& module,
- std::shared_ptr<const PortModel> pm,
- const std::string& name,
- bool flip)
+Port::Port(App& app,
+ Ganv::Module& module,
+ const std::shared_ptr<const PortModel>& pm,
+ const std::string& name,
+ bool flip)
: Ganv::Port(module,
name,
flip ? (!pm->is_input()) : pm->is_input(),
@@ -117,7 +117,7 @@ Port::~Port()
}
std::string
-Port::port_label(App& app, std::shared_ptr<const PortModel> pm)
+Port::port_label(App& app, const std::shared_ptr<const PortModel>& pm)
{
if (!pm) {
return "";