changeset 29955:693329e53f25

move do_class_concat function inside octave namespace * data.h, data.cc (do_class_concat): Move inside octave namespace. Change uses as needed.
author John W. Eaton <jwe@octave.org>
date Sat, 14 Aug 2021 15:47:41 -0400
parents 4c88a452519c
children a956ca6698d2
files libinterp/corefcn/data.cc libinterp/corefcn/data.h libinterp/parse-tree/pt-tm-const.cc
diffstat 3 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc	Sat Aug 14 11:13:17 2021 -0400
+++ b/libinterp/corefcn/data.cc	Sat Aug 14 15:47:41 2021 -0400
@@ -1707,6 +1707,8 @@
   return retval;
 }
 
+OCTAVE_NAMESPACE_BEGIN
+
 octave_value
 do_class_concat (const octave_value_list& ovl, std::string cattype, int dim)
 {
@@ -1775,6 +1777,8 @@
   return retval;
 }
 
+OCTAVE_NAMESPACE_END
+
 static octave_value
 do_cat (const octave_value_list& xargs, int dim, std::string fname)
 {
@@ -1857,7 +1861,7 @@
 
       if (any_class_p)
         {
-          retval = do_class_concat (args, fname, dim);
+          retval = octave::do_class_concat (args, fname, dim);
         }
       else if (result_type == "double")
         {
--- a/libinterp/corefcn/data.h	Sat Aug 14 11:13:17 2021 -0400
+++ b/libinterp/corefcn/data.h	Sat Aug 14 15:47:41 2021 -0400
@@ -33,7 +33,20 @@
 class octave_value;
 class octave_value_list;
 
+OCTAVE_NAMESPACE_BEGIN
+
 extern OCTINTERP_API octave_value
 do_class_concat (const octave_value_list& ovl, std::string cattype, int dim);
 
+OCTAVE_NAMESPACE_END
+
+#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
+OCTAVE_DEPRECATED (7, "use 'octave::do_class_concat' instead")
+extern OCTINTERP_API octave_value
+do_class_concat (const octave_value_list& ovl, std::string cattype, int dim)
+{
+  return octave::do_class_concat (ovl, cattype, dim);
+}
 #endif
+
+#endif
--- a/libinterp/parse-tree/pt-tm-const.cc	Sat Aug 14 11:13:17 2021 -0400
+++ b/libinterp/parse-tree/pt-tm-const.cc	Sat Aug 14 15:47:41 2021 -0400
@@ -442,14 +442,14 @@
             for (const auto& elt : tmrc)
               row(i++) = elt;
 
-            rows(j++) = ::do_class_concat (row, "horzcat", 1);
+            rows(j++) = do_class_concat (row, "horzcat", 1);
           }
       }
 
     if (rows.length () == 1)
       retval = rows(0);
     else
-      retval = ::do_class_concat (rows, "vertcat", 0);
+      retval = do_class_concat (rows, "vertcat", 0);
 
     return retval;
   }