diff src/pt-mat.cc @ 8913:35cd375d4bb3

make tree::dup functions const
author John W. Eaton <jwe@octave.org>
date Thu, 05 Mar 2009 13:50:25 -0500
parents 73c4516fae10
children eb63fbe60fab
line wrap: on
line diff
--- a/src/pt-mat.cc	Thu Mar 05 09:37:59 2009 +0100
+++ b/src/pt-mat.cc	Thu Mar 05 13:50:25 2009 -0500
@@ -1032,13 +1032,13 @@
 
 tree_expression *
 tree_matrix::dup (symbol_table::scope_id scope,
-		  symbol_table::context_id context)
+		  symbol_table::context_id context) const
 {
   tree_matrix *new_matrix = new tree_matrix (0, line (), column ());
 
-  for (iterator p = begin (); p != end (); p++)
+  for (const_iterator p = begin (); p != end (); p++)
     {
-      tree_argument_list *elt = *p;
+      const tree_argument_list *elt = *p;
 
       new_matrix->append (elt ? elt->dup (scope, context) : 0);
     }