changeset 28329:6349915869f2 stable

move function definition from header to source file * stack-frame.h, stack-frame.cc (stack_frame::make_symbol_info_list): Move function definition from header to source file.
author John W. Eaton <jwe@octave.org>
date Mon, 18 May 2020 16:12:23 -0400
parents 5cb09ac94e81
children cf20fd68305e cf7edf5577c3
files libinterp/corefcn/stack-frame.cc libinterp/corefcn/stack-frame.h
diffstat 2 files changed, 22 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/stack-frame.cc	Mon May 18 16:10:52 2020 -0400
+++ b/libinterp/corefcn/stack-frame.cc	Mon May 18 16:12:23 2020 -0400
@@ -247,6 +247,27 @@
     panic_impossible ();
   }
 
+  symbol_info_list
+  stack_frame::make_symbol_info_list (const std::list<symbol_record>& symrec_list) const
+  {
+    symbol_info_list symbol_stats;
+
+    for (const auto& sym : symrec_list)
+      {
+        octave_value value = varval (sym);
+
+        if (value.is_defined ())
+          {
+            symbol_info syminf (sym.name (), value, sym.is_formal (),
+                                is_global (sym), is_persistent (sym));
+
+            symbol_stats.append (syminf);
+          }
+      }
+
+    return symbol_stats;
+  }
+
   // Return first occurrence of variables in current stack frame and any
   // parent frames reachable through access links.
 
--- a/libinterp/corefcn/stack-frame.h	Mon May 18 16:10:52 2020 -0400
+++ b/libinterp/corefcn/stack-frame.h	Mon May 18 16:12:23 2020 -0400
@@ -215,28 +215,8 @@
     virtual unwind_protect *
     unwind_protect_frame (void) const { return nullptr; }
 
-    // FIXME: Should this function be private?
-
     symbol_info_list
-    make_symbol_info_list (const std::list<symbol_record>& symrec_list) const
-    {
-      symbol_info_list symbol_stats;
-
-      for (const auto& sym : symrec_list)
-        {
-          octave_value value = varval (sym);
-
-          if (value.is_defined ())
-            {
-              symbol_info syminf (sym.name (), value, sym.is_formal (),
-                                  is_global (sym), is_persistent (sym));
-
-              symbol_stats.append (syminf);
-            }
-        }
-
-      return symbol_stats;
-    }
+    make_symbol_info_list (const std::list<symbol_record>& symrec_list) const;
 
     symbol_info_list all_variables (void);