Mercurial > hg > octave-lyh
changeset 16893:8fbc09eded8c
Complete removal of warning about assigning to ancient built-in variables.
* libinterp/parse-tree/pt-assign.cc(tree_simple_assignment,
tree_multi_assignment): Remove first_execution variable from constructor.
* libinterp/parse-tree/pt-assign.cc(rvalue1): Remove setting first_execution.
* libinterp/parse-tree/pt-assign.cc(rvalue): Remove setting first_execution.
Remove useless loop over lhs for warning about assigning to built-in vars.
* libinterp/parse-tree/pt-assign.h(tree_simple_assignment,
tree_multi_assignment): Remove first_execution variable from constructors
and from private class variable list.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 03 Jul 2013 20:04:32 -0700 |
parents | 68fc671a9339 |
children | 068f26c93ac7 |
files | libinterp/parse-tree/pt-assign.cc libinterp/parse-tree/pt-assign.h |
diffstat | 2 files changed, 4 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-assign.cc +++ b/libinterp/parse-tree/pt-assign.cc @@ -48,8 +48,7 @@ tree_simple_assignment::tree_simple_assignment (tree_expression *le, tree_expression *re, bool plhs, int l, int c, octave_value::assign_op t) - : tree_expression (l, c), lhs (le), rhs (re), preserve (plhs), etype (t), - first_execution (true) { } + : tree_expression (l, c), lhs (le), rhs (re), preserve (plhs), etype (t) { } tree_simple_assignment::~tree_simple_assignment (void) { @@ -145,8 +144,6 @@ } } - first_execution = false; - return retval; } @@ -181,8 +178,7 @@ tree_multi_assignment::tree_multi_assignment (tree_argument_list *lst, tree_expression *r, bool plhs, int l, int c) - : tree_expression (l, c), lhs (lst), rhs (r), preserve (plhs), - first_execution (true) { } + : tree_expression (l, c), lhs (lst), rhs (r), preserve (plhs) { } tree_multi_assignment::~tree_multi_assignment (void) { @@ -216,14 +212,6 @@ if (error_state) return retval; - if (first_execution) - { - for (tree_argument_list::iterator p = lhs->begin (); - p != lhs->end (); - p++) - tree_expression *lhs_expr = *p; - } - if (rhs) { std::list<octave_lvalue> lvalue_list = lhs->lvalue_list (); @@ -359,8 +347,6 @@ } - first_execution = false; - return retval; }
--- a/libinterp/parse-tree/pt-assign.h +++ b/libinterp/parse-tree/pt-assign.h @@ -47,7 +47,7 @@ tree_simple_assignment (bool plhs = false, int l = -1, int c = -1, octave_value::assign_op t = octave_value::op_asn_eq) : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), ans_ass (), - etype (t), first_execution (true) { } + etype (t) { } tree_simple_assignment (tree_expression *le, tree_expression *re, bool plhs = false, int l = -1, int c = -1, @@ -100,9 +100,6 @@ // The type of the expression. octave_value::assign_op etype; - // true only on first rvalue() call. - bool first_execution; - // No copying! tree_simple_assignment (const tree_simple_assignment&); @@ -118,8 +115,7 @@ public: tree_multi_assignment (bool plhs = false, int l = -1, int c = -1) - : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), - first_execution (true) { } + : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs) { } tree_multi_assignment (tree_argument_list *lst, tree_expression *r, bool plhs = false, int l = -1, int c = -1); @@ -160,9 +156,6 @@ // True if we should not delete the lhs. bool preserve; - // true only on first rvalue() call. - bool first_execution; - // No copying! tree_multi_assignment (const tree_multi_assignment&);