Mercurial > octave-libgccjit
comparison 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 |
comparison
equal
deleted
inserted
replaced
8912:57c3155754d6 | 8913:35cd375d4bb3 |
---|---|
257 return retval; | 257 return retval; |
258 } | 258 } |
259 | 259 |
260 tree_argument_list * | 260 tree_argument_list * |
261 tree_argument_list::dup (symbol_table::scope_id scope, | 261 tree_argument_list::dup (symbol_table::scope_id scope, |
262 symbol_table::context_id context) | 262 symbol_table::context_id context) const |
263 { | 263 { |
264 tree_argument_list *new_list = new tree_argument_list (); | 264 tree_argument_list *new_list = new tree_argument_list (); |
265 | 265 |
266 new_list->list_includes_magic_end = list_includes_magic_end; | 266 new_list->list_includes_magic_end = list_includes_magic_end; |
267 new_list->simple_assign_lhs = simple_assign_lhs; | 267 new_list->simple_assign_lhs = simple_assign_lhs; |
268 | 268 |
269 for (iterator p = begin (); p != end (); p++) | 269 for (const_iterator p = begin (); p != end (); p++) |
270 { | 270 { |
271 tree_expression *elt = *p; | 271 const tree_expression *elt = *p; |
272 | 272 |
273 new_list->append (elt ? elt->dup (scope, context) : 0); | 273 new_list->append (elt ? elt->dup (scope, context) : 0); |
274 } | 274 } |
275 | 275 |
276 return new_list; | 276 return new_list; |