diff options
author | David Robillard <d@drobilla.net> | 2019-03-08 09:06:55 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-03-08 09:06:55 +0100 |
commit | acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9 (patch) | |
tree | a229f986933c8ef9d9c15b36ecf58b04ebeaa7c0 /ingen/client | |
parent | 112eb3a668f65547b1757978b02cbafebf97b794 (diff) | |
download | ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.tar.gz ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.tar.bz2 ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.zip |
Pass World everywhere by reference
Diffstat (limited to 'ingen/client')
-rw-r--r-- | ingen/client/PluginModel.hpp | 2 | ||||
-rw-r--r-- | ingen/client/PluginUI.hpp | 8 | ||||
-rw-r--r-- | ingen/client/SocketClient.hpp | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index 97fbd2a0..08a0fec9 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -83,7 +83,7 @@ public: bool has_ui() const; - SPtr<PluginUI> ui(ingen::World* world, + SPtr<PluginUI> ui(ingen::World& world, SPtr<const BlockModel> block) const; std::string documentation(bool html) const; diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp index 6a6d6db9..f17c8f61 100644 --- a/ingen/client/PluginUI.hpp +++ b/ingen/client/PluginUI.hpp @@ -48,7 +48,7 @@ public: * connected first. The caller should connect to signal_property_changed, * then call instantiate(). */ - static SPtr<PluginUI> create(ingen::World* world, + static SPtr<PluginUI> create(ingen::World& world, SPtr<const BlockModel> block, const LilvPlugin* plugin); @@ -81,17 +81,17 @@ public: const Atom&, // Object Resource::Graph); // Context - ingen::World* world() const { return _world; } + ingen::World& world() const { return _world; } SPtr<const BlockModel> block() const { return _block; } private: - PluginUI(ingen::World* world, + PluginUI(ingen::World& world, SPtr<const BlockModel> block, LilvUIs* uis, const LilvUI* ui, const LilvNode* ui_type); - ingen::World* _world; + ingen::World& _world; SPtr<const BlockModel> _block; SuilInstance* _instance; LilvUIs* _uis; diff --git a/ingen/client/SocketClient.hpp b/ingen/client/SocketClient.hpp index 9703cf29..bce5ab38 100644 --- a/ingen/client/SocketClient.hpp +++ b/ingen/client/SocketClient.hpp @@ -47,7 +47,7 @@ public: } static SPtr<ingen::Interface> - new_socket_interface(ingen::World* world, + new_socket_interface(ingen::World& world, const URI& uri, SPtr<ingen::Interface> respondee) { @@ -57,16 +57,16 @@ public: SPtr<Raul::Socket> sock(new Raul::Socket(type)); if (!sock->connect(uri)) { - world->log().error(fmt("Failed to connect <%1%> (%2%)\n") + world.log().error(fmt("Failed to connect <%1%> (%2%)\n") % sock->uri() % strerror(errno)); return SPtr<Interface>(); } - return SPtr<Interface>(new SocketClient(*world, uri, sock, respondee)); + return SPtr<Interface>(new SocketClient(world, uri, sock, respondee)); } - static void register_factories(World* world) { - world->add_interface_factory("unix", &new_socket_interface); - world->add_interface_factory("tcp", &new_socket_interface); + static void register_factories(World& world) { + world.add_interface_factory("unix", &new_socket_interface); + world.add_interface_factory("tcp", &new_socket_interface); } private: |