From c35cbf038d0992887b8d4bcf5d4ff83c323ec60c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 18:03:43 +0100 Subject: Cleanup: Avoid parameter copying overhead --- src/gui/GraphCanvas.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui/GraphCanvas.hpp') diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 9047a373..7aa4bb98 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -61,14 +61,14 @@ public: void show_port_names(bool b); bool show_port_names() const { return _show_port_names; } - void add_plugin(SPtr p); + void add_plugin(const SPtr& p); void remove_plugin(const URI& uri); - void add_block(SPtr bm); - void remove_block(SPtr bm); - void add_port(SPtr pm); - void remove_port(SPtr pm); - void connection(SPtr arc); - void disconnection(SPtr arc); + void add_block(const SPtr& bm); + void remove_block(const SPtr& bm); + void add_port(const SPtr& pm); + void remove_port(const SPtr& pm); + void connection(const SPtr& arc); + void disconnection(const SPtr& arc); void get_new_module_location(double& x, double& y); @@ -106,7 +106,7 @@ private: Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT); - Ganv::Port* get_port_view(SPtr port); + Ganv::Port* get_port_view(const SPtr& port); void connect(Ganv::Node* tail, Ganv::Node* head); -- cgit v1.2.1