diff options
author | David Robillard <d@drobilla.net> | 2017-12-25 16:13:15 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-25 16:26:13 -0500 |
commit | bd89362f08dc07b3444d19bc373f2b4f8bc47b2c (patch) | |
tree | 047cd2cf2779d87f1db561186410aa545f632c7b /src/gui | |
parent | 71808f61f7db48a7ab4e16537b94ee5686749909 (diff) | |
download | ingen-bd89362f08dc07b3444d19bc373f2b4f8bc47b2c.tar.gz ingen-bd89362f08dc07b3444d19bc373f2b4f8bc47b2c.tar.bz2 ingen-bd89362f08dc07b3444d19bc373f2b4f8bc47b2c.zip |
Use std::move to potentially avoid copying
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/ConnectWindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/ConnectWindow.hpp | 4 | ||||
-rw-r--r-- | src/gui/GraphCanvas.cpp | 2 | ||||
-rw-r--r-- | src/gui/ThreadedLoader.cpp | 2 | ||||
-rw-r--r-- | src/gui/URIEntry.cpp | 8 | ||||
-rw-r--r-- | src/gui/URIEntry.hpp | 6 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 74cba256..7cacb498 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -45,10 +45,10 @@ using namespace Ingen::Client; namespace Ingen { namespace GUI { -ConnectWindow::ConnectWindow(BaseObjectType* cobject, - const Glib::RefPtr<Gtk::Builder>& xml) +ConnectWindow::ConnectWindow(BaseObjectType* cobject, + Glib::RefPtr<Gtk::Builder> xml) : Dialog(cobject) - , _xml(xml) + , _xml(std::move(xml)) , _icon(nullptr) , _progress_bar(nullptr) , _progress_label(nullptr) diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp index b3b7473e..015a6e76 100644 --- a/src/gui/ConnectWindow.hpp +++ b/src/gui/ConnectWindow.hpp @@ -46,8 +46,8 @@ class App; class ConnectWindow : public Dialog { public: - ConnectWindow(BaseObjectType* cobject, - const Glib::RefPtr<Gtk::Builder>& xml); + ConnectWindow(BaseObjectType* cobject, + Glib::RefPtr<Gtk::Builder> xml); void set_connected_to(SPtr<Ingen::Interface> engine); void start(App& app, Ingen::World* world); diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 2d168468..8db0ef9c 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -78,7 +78,7 @@ GraphCanvas::GraphCanvas(App& app, int height) : Canvas(width, height) , _app(app) - , _graph(graph) + , _graph(std::move(graph)) , _auto_position_count(0) , _menu_x(0) , _menu_y(0) diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 37636c42..93c97cbd 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -32,7 +32,7 @@ namespace GUI { ThreadedLoader::ThreadedLoader(App& app, SPtr<Interface> engine) : _app(app) , _sem(0) - , _engine(engine) + , _engine(std::move(engine)) , _exit_flag(false) , _thread(&ThreadedLoader::run, this) { diff --git a/src/gui/URIEntry.cpp b/src/gui/URIEntry.cpp index 466948e4..30e6edb2 100644 --- a/src/gui/URIEntry.cpp +++ b/src/gui/URIEntry.cpp @@ -23,12 +23,12 @@ namespace Ingen { namespace GUI { -URIEntry::URIEntry(App* app, - const std::set<Raul::URI>& types, - const std::string& value) +URIEntry::URIEntry(App* app, + std::set<Raul::URI> types, + const std::string& value) : Gtk::HBox(false, 4) , _app(app) - , _types(types) + , _types(std::move(types)) , _menu_button(Gtk::manage(new Gtk::Button("≡"))) , _entry(Gtk::manage(new Gtk::Entry())) { diff --git a/src/gui/URIEntry.hpp b/src/gui/URIEntry.hpp index f49f5b0d..90df2160 100644 --- a/src/gui/URIEntry.hpp +++ b/src/gui/URIEntry.hpp @@ -36,9 +36,9 @@ public: * If `types` is given, then a menu button will be shown which pops up a * enu for easily choosing known values with valid types. */ - URIEntry(App* app, - const std::set<Raul::URI>& types, - const std::string& value); + URIEntry(App* app, + std::set<Raul::URI> types, + const std::string& value); std::string get_text() { return _entry->get_text(); } Glib::SignalProxy0<void> signal_changed() { return _entry->signal_changed(); } |