diff src/pt-arg-list.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-arg-list.cc	Thu Mar 05 09:37:59 2009 +0100
+++ b/src/pt-arg-list.cc	Thu Mar 05 13:50:25 2009 -0500
@@ -259,16 +259,16 @@
 
 tree_argument_list *
 tree_argument_list::dup (symbol_table::scope_id scope,
-			 symbol_table::context_id context)
+			 symbol_table::context_id context) const
 {
   tree_argument_list *new_list = new tree_argument_list ();
 
   new_list->list_includes_magic_end = list_includes_magic_end;
   new_list->simple_assign_lhs = simple_assign_lhs;
 
-  for (iterator p = begin (); p != end (); p++)
+  for (const_iterator p = begin (); p != end (); p++)
     {
-      tree_expression *elt = *p;
+      const tree_expression *elt = *p;
 
       new_list->append (elt ? elt->dup (scope, context) : 0);
     }