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/Port.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/Port.cpp')
-rw-r--r-- | src/gui/Port.cpp | 20 |
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 ""; |