changeset 24631:6de74d95a7a1

don't use "const bool&" unnecessarily * octave-qt-link.h, octave-qt-link.cc (octave_qt_link::do_set_workspace): Pass bool arg update_variable_editor by value. Don't provide default value. * octave-link.h, octave-link.cc (octave_link::set_workspace, octave_link::do_set_workspace): Pass bool arg update_variable_editor by value. Don't provide default value. (octave_link::do_set_workspace (void)): Pass true as value for update_variable_editor in call to do_set_workspace.
author John W. Eaton <jwe@octave.org>
date Mon, 22 Jan 2018 01:25:06 -0500
parents 81c84fd1ae57
children e9f7cfd40f85
files libgui/src/octave-qt-link.cc libgui/src/octave-qt-link.h libinterp/corefcn/octave-link.cc libinterp/corefcn/octave-link.h
diffstat 4 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/octave-qt-link.cc	Mon Jan 22 01:03:56 2018 -0500
+++ b/libgui/src/octave-qt-link.cc	Mon Jan 22 01:25:06 2018 -0500
@@ -419,7 +419,7 @@
 void
 octave_qt_link::do_set_workspace (bool top_level, bool debug,
                                   const std::list<workspace_element>& ws,
-                                  const bool& update_variable_editor)
+                                  bool update_variable_editor)
 {
   if (! top_level && ! debug)
     return;
--- a/libgui/src/octave-qt-link.h	Mon Jan 22 01:03:56 2018 -0500
+++ b/libgui/src/octave-qt-link.h	Mon Jan 22 01:25:06 2018 -0500
@@ -111,7 +111,7 @@
 
   void do_set_workspace (bool top_level, bool debug,
                          const std::list<workspace_element>& ws,
-                         const bool& variable_editor_too = true);
+                         bool update_variable_editor);
 
   void do_clear_workspace (void);
 
--- a/libinterp/corefcn/octave-link.cc	Mon Jan 22 01:03:56 2018 -0500
+++ b/libinterp/corefcn/octave-link.cc	Mon Jan 22 01:25:06 2018 -0500
@@ -76,7 +76,7 @@
         workspace_info = scope.workspace_info ();
 
       instance->do_set_workspace (symtab.at_top_level (),
-                                  instance->debugging, workspace_info);
+                                  instance->debugging, workspace_info, true);
     }
 }
 
--- a/libinterp/corefcn/octave-link.h	Mon Jan 22 01:03:56 2018 -0500
+++ b/libinterp/corefcn/octave-link.h	Mon Jan 22 01:25:06 2018 -0500
@@ -260,10 +260,12 @@
   static void set_workspace (void);
 
   static void set_workspace (bool top_level,
-                             const std::list<workspace_element>& ws, const bool& update_variable_editor = true)
+                             const std::list<workspace_element>& ws,
+                             bool update_variable_editor = true)
   {
     if (enabled ())
-      instance->do_set_workspace (top_level, instance->debugging, ws, update_variable_editor);
+      instance->do_set_workspace (top_level, instance->debugging, ws,
+                                  update_variable_editor);
   }
 
   static void clear_workspace (void)
@@ -546,7 +548,7 @@
   virtual void
   do_set_workspace (bool top_level, bool debug,
                     const std::list<workspace_element>& ws,
-                    const bool& variable_editor_too = true) = 0;
+                    bool update_variable_editor) = 0;
 
   virtual void do_clear_workspace (void) = 0;