From 7dd4f9783c967f16ace8ecf4c0e1c44edcaadc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Thu, 8 Oct 2015 16:10:31 +0200 Subject: [PATCH] Use reference instead of copy --- src/dialogs.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dialogs.cc b/src/dialogs.cc index 8ff3882..8009e02 100644 --- a/src/dialogs.cc +++ b/src/dialogs.cc @@ -4,7 +4,7 @@ #include std::string open_dialog(const std::string &title, - const std::vector> buttons, + const std::vector> &buttons, Gtk::FileChooserAction gtk_options) { Gtk::FileChooserDialog dialog(title, gtk_options); if(Singleton::directories()->current_path!="") @@ -47,4 +47,5 @@ std::string Dialog::save_file() { return open_dialog("Please choose a file", {std::make_pair("Cancel", Gtk::RESPONSE_CANCEL),std::make_pair("Save", Gtk::RESPONSE_OK)}, Gtk::FILE_CHOOSER_ACTION_OPEN); -} \ No newline at end of file +} +