Mercurial > hg > octave-lyh
diff src/pt-unop.cc @ 10315:57a59eae83cc
untabify src C++ source files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 11 Feb 2010 12:41:46 -0500 |
parents | cd96d29c5efa |
children | d1194069e58c |
line wrap: on
line diff
--- a/src/pt-unop.cc +++ b/src/pt-unop.cc @@ -50,7 +50,7 @@ if (nargout > 1) error ("prefix operator `%s': invalid number of output arguments", - oper () . c_str ()); + oper () . c_str ()); else retval = rvalue1 (nargout); @@ -68,27 +68,27 @@ if (op) { if (etype == octave_value::op_incr || etype == octave_value::op_decr) - { - op->rvalue1 (); + { + op->rvalue1 (); - if (! error_state) - { - octave_lvalue ref = op->lvalue (); + if (! error_state) + { + octave_lvalue ref = op->lvalue (); - if (! error_state && ref.is_defined ()) - { - ref.do_unary_op (etype); + if (! error_state && ref.is_defined ()) + { + ref.do_unary_op (etype); - retval = ref.value (); - } - } - } + retval = ref.value (); + } + } + } else - { - octave_value val = op->rvalue1 (); + { + octave_value val = op->rvalue1 (); - if (! error_state && val.is_defined ()) - { + if (! error_state && val.is_defined ()) + { // Attempt to do the operation in-place if it is unshared // (a temporary expression). if (val.get_count () == 1) @@ -96,10 +96,10 @@ else retval = ::do_unary_op (etype, val); - if (error_state) - retval = octave_value (); - } - } + if (error_state) + retval = octave_value (); + } + } } return retval; @@ -107,11 +107,11 @@ tree_expression * tree_prefix_expression::dup (symbol_table::scope_id scope, - symbol_table::context_id context) const + symbol_table::context_id context) const { tree_prefix_expression *new_pe = new tree_prefix_expression (op ? op->dup (scope, context) : 0, - line (), column (), etype); + line (), column (), etype); new_pe->copy_base (*this); @@ -133,7 +133,7 @@ if (nargout > 1) error ("postfix operator `%s': invalid number of output arguments", - oper () . c_str ()); + oper () . c_str ()); else retval = rvalue1 (nargout); @@ -151,33 +151,33 @@ if (op) { if (etype == octave_value::op_incr || etype == octave_value::op_decr) - { - op->rvalue1 (); + { + op->rvalue1 (); - if (! error_state) - { - octave_lvalue ref = op->lvalue (); + if (! error_state) + { + octave_lvalue ref = op->lvalue (); - if (! error_state && ref.is_defined ()) - { - retval = ref.value (); + if (! error_state && ref.is_defined ()) + { + retval = ref.value (); - ref.do_unary_op (etype); - } - } - } + ref.do_unary_op (etype); + } + } + } else - { - octave_value val = op->rvalue1 (); + { + octave_value val = op->rvalue1 (); - if (! error_state && val.is_defined ()) - { - retval = ::do_unary_op (etype, val); + if (! error_state && val.is_defined ()) + { + retval = ::do_unary_op (etype, val); - if (error_state) - retval = octave_value (); - } - } + if (error_state) + retval = octave_value (); + } + } } return retval; @@ -185,11 +185,11 @@ tree_expression * tree_postfix_expression::dup (symbol_table::scope_id scope, - symbol_table::context_id context) const + symbol_table::context_id context) const { tree_postfix_expression *new_pe = new tree_postfix_expression (op ? op->dup (scope, context) : 0, - line (), column (), etype); + line (), column (), etype); new_pe->copy_base (*this);