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 /ingen/client | |
parent | cfee0cd7d2a704153df73449be38fcef60b958eb (diff) | |
download | ingen-dbb38be5ccda387ef458583b5a85c03b59a5e05c.tar.gz ingen-dbb38be5ccda387ef458583b5a85c03b59a5e05c.tar.bz2 ingen-dbb38be5ccda387ef458583b5a85c03b59a5e05c.zip |
Fix unnecessary parameter copies
Diffstat (limited to 'ingen/client')
-rw-r--r-- | ingen/client/ClientStore.hpp | 12 | ||||
-rw-r--r-- | ingen/client/PluginModel.hpp | 6 | ||||
-rw-r--r-- | ingen/client/PluginUI.hpp | 6 | ||||
-rw-r--r-- | ingen/client/SocketClient.hpp | 22 |
4 files changed, 23 insertions, 23 deletions
diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp index 9576cd3c..109bd835 100644 --- a/ingen/client/ClientStore.hpp +++ b/ingen/client/ClientStore.hpp @@ -59,9 +59,9 @@ class INGEN_API ClientStore : public Store , public INGEN_TRACKABLE { public: ClientStore( - URIs& uris, - Log& log, - SPtr<SigClientInterface> emitter = SPtr<SigClientInterface>()); + URIs& uris, + Log& log, + const SPtr<SigClientInterface>& emitter = SPtr<SigClientInterface>()); URI uri() const override { return URI("ingen:/clients/store"); } @@ -75,7 +75,7 @@ public: SPtr<const Plugins> plugins() const { return _plugins; } SPtr<Plugins> plugins() { return _plugins; } - void set_plugins(SPtr<Plugins> p) { _plugins = p; } + void set_plugins(SPtr<Plugins> p) { _plugins = std::move(p); } URIs& uris() { return _uris; } @@ -108,10 +108,10 @@ private: SPtr<PluginModel> _plugin(const Atom& uri); SPtr<Resource> _resource(const URI& uri); - void add_object(SPtr<ObjectModel> object); + void add_object(const SPtr<ObjectModel>& object); SPtr<ObjectModel> remove_object(const Raul::Path& path); - void add_plugin(SPtr<PluginModel> pm); + void add_plugin(const SPtr<PluginModel>& pm); SPtr<GraphModel> connection_graph(const Raul::Path& tail_path, const Raul::Path& head_path); diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index dc0c724f..10ab3a6a 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -82,8 +82,8 @@ public: bool has_ui() const; - SPtr<PluginUI> ui(ingen::World& world, - SPtr<const BlockModel> block) const; + SPtr<PluginUI> + ui(ingen::World& world, const SPtr<const BlockModel>& block) const; std::string documentation(bool html) const; std::string port_documentation(uint32_t index, bool html) const; @@ -104,7 +104,7 @@ public: protected: friend class ClientStore; - void set(SPtr<PluginModel> p); + void set(const SPtr<PluginModel>& p); void add_preset(const URI& uri, const std::string& label); diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp index b5d467ea..70ff7274 100644 --- a/ingen/client/PluginUI.hpp +++ b/ingen/client/PluginUI.hpp @@ -53,9 +53,9 @@ public: * connected first. The caller should connect to signal_property_changed, * then call instantiate(). */ - static SPtr<PluginUI> create(ingen::World& world, - SPtr<const BlockModel> block, - const LilvPlugin* plugin); + static SPtr<PluginUI> create(ingen::World& world, + const SPtr<const BlockModel>& block, + const LilvPlugin* plugin); /** Instantiate the UI. * diff --git a/ingen/client/SocketClient.hpp b/ingen/client/SocketClient.hpp index 092ef9d2..8e551821 100644 --- a/ingen/client/SocketClient.hpp +++ b/ingen/client/SocketClient.hpp @@ -29,27 +29,27 @@ namespace client { class INGEN_API SocketClient : public SocketWriter { public: - SocketClient(World& world, - const URI& uri, - SPtr<Raul::Socket> sock, - SPtr<Interface> respondee) - : SocketWriter(world.uri_map(), world.uris(), uri, sock) - , _respondee(respondee) - , _reader(world, *respondee.get(), sock) + SocketClient(World& world, + const URI& uri, + const SPtr<Raul::Socket>& sock, + const SPtr<Interface>& respondee) + : SocketWriter(world.uri_map(), world.uris(), uri, sock) + , _respondee(respondee) + , _reader(world, *respondee.get(), sock) {} SPtr<Interface> respondee() const override { return _respondee; } - void set_respondee(SPtr<Interface> respondee) override { + void set_respondee(const SPtr<Interface>& respondee) override { _respondee = respondee; } static SPtr<ingen::Interface> - new_socket_interface(ingen::World& world, - const URI& uri, - SPtr<ingen::Interface> respondee) + new_socket_interface(ingen::World& world, + const URI& uri, + const SPtr<ingen::Interface>& respondee) { const Raul::Socket::Type type = (uri.scheme() == "unix" ? Raul::Socket::Type::UNIX |