diff options
author | David Robillard <d@drobilla.net> | 2019-12-08 18:03:43 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-08 20:59:06 +0100 |
commit | c35cbf038d0992887b8d4bcf5d4ff83c323ec60c (patch) | |
tree | 02384c6a8671e866a54cbd9f6002a3dd145116b9 /src/gui/GraphTreeWindow.cpp | |
parent | 8215246d12f49573f7ebcdc62ddae84185c22bfe (diff) | |
download | ingen-c35cbf038d0992887b8d4bcf5d4ff83c323ec60c.tar.gz ingen-c35cbf038d0992887b8d4bcf5d4ff83c323ec60c.tar.bz2 ingen-c35cbf038d0992887b8d4bcf5d4ff83c323ec60c.zip |
Cleanup: Avoid parameter copying overhead
Diffstat (limited to 'src/gui/GraphTreeWindow.cpp')
-rw-r--r-- | src/gui/GraphTreeWindow.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp index 7d00b0f5..5046eac9 100644 --- a/src/gui/GraphTreeWindow.cpp +++ b/src/gui/GraphTreeWindow.cpp @@ -73,7 +73,7 @@ GraphTreeWindow::init(App& app, ClientStore& store) } void -GraphTreeWindow::new_object(SPtr<ObjectModel> object) +GraphTreeWindow::new_object(const SPtr<ObjectModel>& object) { SPtr<GraphModel> graph = dynamic_ptr_cast<GraphModel>(object); if (graph) { @@ -82,7 +82,7 @@ GraphTreeWindow::new_object(SPtr<ObjectModel> object) } void -GraphTreeWindow::add_graph(SPtr<GraphModel> pm) +GraphTreeWindow::add_graph(const SPtr<GraphModel>& pm) { if (!pm->parent()) { Gtk::TreeModel::iterator iter = _graph_treestore->append(); @@ -123,7 +123,7 @@ GraphTreeWindow::add_graph(SPtr<GraphModel> pm) } void -GraphTreeWindow::remove_graph(SPtr<GraphModel> pm) +GraphTreeWindow::remove_graph(const SPtr<GraphModel>& pm) { Gtk::TreeModel::iterator i = find_graph(_graph_treestore->children(), pm); if (i != _graph_treestore->children().end()) { @@ -132,8 +132,8 @@ GraphTreeWindow::remove_graph(SPtr<GraphModel> pm) } Gtk::TreeModel::iterator -GraphTreeWindow::find_graph(Gtk::TreeModel::Children root, - SPtr<client::ObjectModel> graph) +GraphTreeWindow::find_graph(Gtk::TreeModel::Children root, + const SPtr<client::ObjectModel>& graph) { for (Gtk::TreeModel::iterator c = root.begin(); c != root.end(); ++c) { SPtr<GraphModel> pm = (*c)[_graph_tree_columns.graph_model_col]; @@ -193,9 +193,9 @@ GraphTreeWindow::event_graph_enabled_toggled(const Glib::ustring& path_str) } void -GraphTreeWindow::graph_property_changed(const URI& key, - const Atom& value, - SPtr<GraphModel> graph) +GraphTreeWindow::graph_property_changed(const URI& key, + const Atom& value, + const SPtr<GraphModel>& graph) { const URIs& uris = _app->uris(); _enable_signal = false; @@ -212,7 +212,7 @@ GraphTreeWindow::graph_property_changed(const URI& key, } void -GraphTreeWindow::graph_moved(SPtr<GraphModel> graph) +GraphTreeWindow::graph_moved(const SPtr<GraphModel>& graph) { _enable_signal = false; |