diff options
author | David Robillard <d@drobilla.net> | 2020-08-01 14:42:16 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 01:48:48 +0200 |
commit | dbb38be5ccda387ef458583b5a85c03b59a5e05c (patch) | |
tree | ca6e767d1e7d6aa86efa992c14b6f1e967309aa5 /src/client | |
parent | cfee0cd7d2a704153df73449be38fcef60b958eb (diff) | |
download | ingen-dbb38be5ccda387ef458583b5a85c03b59a5e05c.tar.gz ingen-dbb38be5ccda387ef458583b5a85c03b59a5e05c.tar.bz2 ingen-dbb38be5ccda387ef458583b5a85c03b59a5e05c.zip |
Fix unnecessary parameter copies
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/ClientStore.cpp | 10 | ||||
-rw-r--r-- | src/client/PluginModel.cpp | 5 | ||||
-rw-r--r-- | src/client/PluginUI.cpp | 6 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index e494e874..a0c30c85 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -35,9 +35,9 @@ namespace ingen { namespace client { -ClientStore::ClientStore(URIs& uris, - Log& log, - SPtr<SigClientInterface> emitter) +ClientStore::ClientStore(URIs& uris, + Log& log, + const SPtr<SigClientInterface>& emitter) : _uris(uris) , _log(log) , _emitter(emitter) @@ -57,7 +57,7 @@ ClientStore::clear() } void -ClientStore::add_object(SPtr<ObjectModel> object) +ClientStore::add_object(const SPtr<ObjectModel>& object) { // If we already have "this" object, merge the existing one into the new // one (with precedence to the new values). @@ -189,7 +189,7 @@ ClientStore::resource(const URI& uri) const } void -ClientStore::add_plugin(SPtr<PluginModel> pm) +ClientStore::add_plugin(const SPtr<PluginModel>& pm) { SPtr<PluginModel> existing = _plugin(pm->uri()); if (existing) { diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 6c6b9748..92a1b295 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -153,7 +153,7 @@ PluginModel::get_property(const URI& key) const } void -PluginModel::set(SPtr<PluginModel> p) +PluginModel::set(const SPtr<PluginModel>& p) { _type = p->_type; @@ -242,8 +242,7 @@ PluginModel::has_ui() const } SPtr<PluginUI> -PluginModel::ui(ingen::World& world, - SPtr<const BlockModel> block) const +PluginModel::ui(ingen::World& world, const SPtr<const BlockModel>& block) const { if (!_lilv_plugin) { return SPtr<PluginUI>(); diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index bc58020a..6fdf76c5 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -178,9 +178,9 @@ PluginUI::~PluginUI() } SPtr<PluginUI> -PluginUI::create(ingen::World& world, - SPtr<const BlockModel> block, - const LilvPlugin* plugin) +PluginUI::create(ingen::World& world, + const SPtr<const BlockModel>& block, + const LilvPlugin* plugin) { if (!PluginUI::ui_host) { PluginUI::ui_host = suil_host_new(lv2_ui_write, |