diff libgui/src/m-editor/octave-qscintilla.cc @ 27101:097774bed4ed

move some static functions inside octave namespace In most files that define static functions and use the octave namespace, define the static fucntions inside the namespace. Files affected: octave-qscintilla.cc, main-window.cc, variable-editor-model.cc, variable-editor.cc, welcome-wizard.cc, call-stack.cc, environment.cc, help.cc, input.cc, load-path.cc, sysdep.cc, text-renderer.cc, url-handle-manager.cc, __ode15__.cc, ov-typeinfo.cc, aepbalance.cc, chol.cc, gsvd.cc, file-ops.cc, lo-array-errwarn.cc, lo-regexp.cc, oct-glob.cc, and oct-sparse.cc.
author John W. Eaton <jwe@octave.org>
date Tue, 21 May 2019 19:50:59 +0000
parents 48ddf51a6ef7
children e14e48e838fa
line wrap: on
line diff
--- a/libgui/src/m-editor/octave-qscintilla.cc	Tue May 21 17:39:13 2019 +0000
+++ b/libgui/src/m-editor/octave-qscintilla.cc	Tue May 21 19:50:59 2019 +0000
@@ -65,45 +65,45 @@
 // Used for testing the last word of an "if" etc. line,
 // or the first word of the following line.
 
-static bool
-is_end (const QString& candidate, const QString& opening)
-{
-  bool retval = false;
-
-  if (opening == "do")          // The only one that can't be ended by "end"
-    {
-      if (candidate == "until")
-        retval = true;
-    }
-  else
-    {
-      if (candidate == "end")
-        retval =  true;
-      else
-        {
-          if (opening == "try")
-            {
-              if (candidate == "catch" || candidate == "end_try_catch")
-                retval = true;
-            }
-          else if (opening == "unwind_protect")
-            {
-              if (candidate == "unwind_protect_cleanup"
-                  || candidate == "end_unwind_protect")
-                retval = true;
-            }
-          else if (candidate == "end" + opening)
-            retval = true;
-          else if (opening == "if" && candidate == "else")
-            retval = true;
-        }
-    }
-
-  return retval;
-}
-
 namespace octave
 {
+  static bool
+  is_end (const QString& candidate, const QString& opening)
+  {
+    bool retval = false;
+
+    if (opening == "do")          // The only one that can't be ended by "end"
+      {
+        if (candidate == "until")
+          retval = true;
+      }
+    else
+      {
+        if (candidate == "end")
+          retval =  true;
+        else
+          {
+            if (opening == "try")
+              {
+                if (candidate == "catch" || candidate == "end_try_catch")
+                  retval = true;
+              }
+            else if (opening == "unwind_protect")
+              {
+                if (candidate == "unwind_protect_cleanup"
+                    || candidate == "end_unwind_protect")
+                  retval = true;
+              }
+            else if (candidate == "end" + opening)
+              retval = true;
+            else if (opening == "if" && candidate == "else")
+              retval = true;
+          }
+      }
+
+    return retval;
+  }
+
   octave_qscintilla::octave_qscintilla (QWidget *p)
     : QsciScintilla (p), m_word_at_cursor (), m_selection (),
       m_selection_replacement (), m_selection_line (-1),