changeset 29959:9e35973fb6c0

* data.h, data.cc (do_class_concat): Pass string argument by const reference.
author John W. Eaton <jwe@octave.org>
date Sat, 14 Aug 2021 18:55:37 -0400
parents 32c3a5805893
children 939bef0b66e0
files libinterp/corefcn/data.cc libinterp/corefcn/data.h
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc	Fri Aug 13 21:53:51 2021 -0400
+++ b/libinterp/corefcn/data.cc	Sat Aug 14 18:55:37 2021 -0400
@@ -1709,7 +1709,8 @@
 }
 
 octave_value
-do_class_concat (const octave_value_list& ovl, std::string cattype, int dim)
+do_class_concat (const octave_value_list& ovl,
+                 const std::string& cattype, int dim)
 {
   octave_value retval;
 
--- a/libinterp/corefcn/data.h	Fri Aug 13 21:53:51 2021 -0400
+++ b/libinterp/corefcn/data.h	Sat Aug 14 18:55:37 2021 -0400
@@ -36,14 +36,16 @@
 OCTAVE_NAMESPACE_BEGIN
 
 extern OCTINTERP_API octave_value
-do_class_concat (const octave_value_list& ovl, std::string cattype, int dim);
+do_class_concat (const octave_value_list& ovl, const 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)
+do_class_concat (const octave_value_list& ovl, const std::string& cattype,
+                 int dim)
 {
   return octave::do_class_concat (ovl, cattype, dim);
 }