[glom] Correct some const by-value parameters



commit d2aa83c43b90c2f91c6fa12129442141d0dd453f
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Nov 7 14:02:45 2016 +0100

    Correct some const by-value parameters
    
    Noticed by
    clang-tidy-3.9 --checks=-*,performance-*

 glom/frame_glom.cc              |    6 +++---
 glom/frame_glom.h               |    6 +++---
 tests/test_selfhosting_utils.cc |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index e85abd3..adb1f50 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -1426,7 +1426,7 @@ void Frame_Glom::on_menu_developer_fields()
 
 }
 
-void Frame_Glom::do_menu_developer_fields(Gtk::Window& parent, const Glib::ustring table_name)
+void Frame_Glom::do_menu_developer_fields(Gtk::Window& parent, const Glib::ustring& table_name)
 {
   if(!m_dialog_fields)
   {
@@ -1489,7 +1489,7 @@ void Frame_Glom::on_menu_developer_relationships_overview()
   }
 }
 
-void Frame_Glom::do_menu_developer_relationships(Gtk::Window& parent, const Glib::ustring table_name)
+void Frame_Glom::do_menu_developer_relationships(Gtk::Window& parent, const Glib::ustring& table_name)
 {
   //Create the widget if necessary:
   if(!m_dialog_relationships)
@@ -2082,7 +2082,7 @@ bool Frame_Glom::handle_request_password_connection_error(bool asked_for_passwor
   }
 }
 
-bool Frame_Glom::connection_request_password_and_attempt(bool& database_not_found, const Glib::ustring 
known_username, const Glib::ustring& known_password, bool confirm_known_user)
+bool Frame_Glom::connection_request_password_and_attempt(bool& database_not_found, const Glib::ustring& 
known_username, const Glib::ustring& known_password, bool confirm_known_user)
 {
   //Initialize output parameter:
   database_not_found = false;
diff --git a/glom/frame_glom.h b/glom/frame_glom.h
index b245b26..94e6d67 100644
--- a/glom/frame_glom.h
+++ b/glom/frame_glom.h
@@ -116,10 +116,10 @@ public:
   void on_menu_developer_database_preferences();
   void on_menu_developer_fields();
   void do_menu_developer_fields(Gtk::Window& parent);
-  void do_menu_developer_fields(Gtk::Window& parent, const Glib::ustring table_name);
+  void do_menu_developer_fields(Gtk::Window& parent, const Glib::ustring& table_name);
   void on_menu_developer_relationships_overview();
   void on_menu_developer_relationships();
-  void do_menu_developer_relationships(Gtk::Window& parent, const Glib::ustring table_name);
+  void do_menu_developer_relationships(Gtk::Window& parent, const Glib::ustring& table_name);
   void on_menu_developer_users();
   void on_menu_developer_layout();
   void on_menu_developer_reports();
@@ -158,7 +158,7 @@ public:
    * @param confirm_existing_user If true then an alternative message text will be shown.
    * @result true if the connection succeeded and the database was found on the server.
    */
-  bool connection_request_password_and_attempt(bool& database_not_found, const Glib::ustring known_username 
= Glib::ustring(), const Glib::ustring& known_password = Glib::ustring(), bool confirm_existing_user = false);
+  bool connection_request_password_and_attempt(bool& database_not_found, const Glib::ustring& known_username 
= Glib::ustring(), const Glib::ustring& known_password = Glib::ustring(), bool confirm_existing_user = false);
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Show the dialog to request the password, and choose an unused database name.
diff --git a/tests/test_selfhosting_utils.cc b/tests/test_selfhosting_utils.cc
index 89df33c..84ca1e4 100644
--- a/tests/test_selfhosting_utils.cc
+++ b/tests/test_selfhosting_utils.cc
@@ -557,7 +557,7 @@ bool test_example_musiccollection_data(const std::shared_ptr<const Glom::Documen
   return test_example_musiccollection_data_related(document, album_id);
 }
 
-static bool test_hosting_mode(const SlotTest& slot, Glom::Document::HostingMode hosting_mode, const 
Glib::ustring name)
+static bool test_hosting_mode(const SlotTest& slot, Glom::Document::HostingMode hosting_mode, const 
Glib::ustring& name)
 {
   try
   {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]