Mercurial > octave-libgccjit
comparison 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 |
comparison
equal
deleted
inserted
replaced
8912:57c3155754d6 | 8913:35cd375d4bb3 |
---|---|
1030 return retval; | 1030 return retval; |
1031 } | 1031 } |
1032 | 1032 |
1033 tree_expression * | 1033 tree_expression * |
1034 tree_matrix::dup (symbol_table::scope_id scope, | 1034 tree_matrix::dup (symbol_table::scope_id scope, |
1035 symbol_table::context_id context) | 1035 symbol_table::context_id context) const |
1036 { | 1036 { |
1037 tree_matrix *new_matrix = new tree_matrix (0, line (), column ()); | 1037 tree_matrix *new_matrix = new tree_matrix (0, line (), column ()); |
1038 | 1038 |
1039 for (iterator p = begin (); p != end (); p++) | 1039 for (const_iterator p = begin (); p != end (); p++) |
1040 { | 1040 { |
1041 tree_argument_list *elt = *p; | 1041 const tree_argument_list *elt = *p; |
1042 | 1042 |
1043 new_matrix->append (elt ? elt->dup (scope, context) : 0); | 1043 new_matrix->append (elt ? elt->dup (scope, context) : 0); |
1044 } | 1044 } |
1045 | 1045 |
1046 new_matrix->copy_base (*this); | 1046 new_matrix->copy_base (*this); |