diff libinterp/operators/op-scm-m.cc @ 28630:35f974bab4c8

fix constness of cat op args Declare the first argument of the cat_op concatenation operators const. * ov-typeinfo.h (cat_op_fcn): Make first argument of concatenation operator typedef const. * op-b-sbm.cc, op-bm-sbm.cc, op-chm.cc, op-cm-scm.cc, op-cm-sm.cc, op-cs-scm.cc, op-cs-sm.cc, op-m-scm.cc, op-m-sm.cc, op-s-scm.cc, op-s-sm.cc, op-sbm-b.cc, op-sbm-bm.cc, op-scm-cm.cc, op-scm-cs.cc, op-scm-m.cc, op-scm-s.cc, op-sm-cm.cc, op-sm-cs.cc, op-sm-m.cc, op-sm-s.cc, op-struct.cc: Fix concatentation operator declarations and casts as needed. * ops.h (DEFCATOPX, DEFCATOP, DEFCATOP_FN, DEFNDCATOP_FN, DEFNDCHARCATOP_FN, DEFNDCATOP_FN2): Likewise.
author John W. Eaton <jwe@octave.org>
date Thu, 30 Jul 2020 16:15:03 -0400
parents bd51beb6205e
children 7854d5752dd2
line wrap: on
line diff
--- a/libinterp/operators/op-scm-m.cc	Mon Aug 03 17:07:38 2020 -0400
+++ b/libinterp/operators/op-scm-m.cc	Thu Jul 30 16:15:03 2020 -0400
@@ -123,8 +123,8 @@
 
 DEFCATOP (scm_m, sparse_complex_matrix, matrix)
 {
-  octave_sparse_complex_matrix& v1
-    = dynamic_cast<octave_sparse_complex_matrix&> (a1);
+  const octave_sparse_complex_matrix& v1
+    = dynamic_cast<const octave_sparse_complex_matrix&> (a1);
   const octave_matrix& v2 = dynamic_cast<const octave_matrix&> (a2);
   SparseMatrix tmp (v2.matrix_value ());
   return octave_value