Mercurial > hg > octave-terminal
changeset 2989:6a7b578b6fb4
[project @ 1997-05-16 07:54:10 by jwe]
author | jwe |
---|---|
date | Fri, 16 May 1997 07:54:19 +0000 |
parents | daa1ed1f5462 |
children | 35bd1b05cfbe |
files | src/pt-assign.h src/pt-const.h src/pt-decl.cc src/pt-decl.h |
diffstat | 4 files changed, 18 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-assign.h +++ b/src/pt-assign.h @@ -104,10 +104,9 @@ // No copying! - tree_simple_assignment_expression (const tree_simple_assignment_expression&); + tree_simple_assignment (const tree_simple_assignment&); - tree_simple_assignment_expression& - operator = (const tree_simple_assignment_expression&); + tree_simple_assignment& operator = (const tree_simple_assignment&); }; // Multi-valued assignment expressions. @@ -152,10 +151,9 @@ // No copying! - tree_multi_assignment_expression (const tree_multi_assignment_expression&); + tree_multi_assignment (const tree_multi_assignment&); - tree_multi_assignment_expression& - operator = (const tree_multi_assignment_expression&); + tree_multi_assignment& operator = (const tree_multi_assignment&); }; #endif
--- a/src/pt-const.h +++ b/src/pt-const.h @@ -52,21 +52,8 @@ tree_constant (const octave_value& v, int l = -1, int c = -1) : tree_expression (l, c), val (v), orig_text () { } - tree_constant (const tree_constant& a) - : tree_expression (-1, -1), val (a.val), orig_text () { } - ~tree_constant (void) { } - tree_constant& operator = (const tree_constant& a) - { - if (this != &a) - { - tree_expression::operator = (a); - val = a.val; - } - return *this; - } - void *operator new (size_t size) { return allocator.alloc (size); }
--- a/src/pt-decl.cc +++ b/src/pt-decl.cc @@ -54,11 +54,11 @@ // Initializer lists for declaration statements. void -tree_decl_init_list::eval (tree_decl_elt::eval_fcn f, bool skip_init) +tree_decl_init_list::eval (tree_decl_elt::eval_fcn f) { for (Pix p = first (); p != 0; next (p)) { - f (*(this->operator () (p)), skip_init); + f (*(this->operator () (p))); if (error_state) break; @@ -86,8 +86,8 @@ // Global. -static void -do_global_init (tree_decl_elt& elt, bool skip_initializer) +void +tree_global_command::do_init (tree_decl_elt& elt) { tree_identifier *id = elt.ident (); @@ -113,7 +113,7 @@ { if (init_list) { - init_list->eval (do_global_init, initialized); + init_list->eval (do_init); initialized = true; } @@ -125,8 +125,8 @@ // Static. -static void -do_static_init (tree_decl_elt& elt, bool) +void +tree_static_command::do_init (tree_decl_elt& elt) { tree_identifier *id = elt.ident (); @@ -154,7 +154,7 @@ if (init_list && ! initialized) { - init_list->eval (do_static_init, initialized); + init_list->eval (do_init); initialized = true;
--- a/src/pt-decl.h +++ b/src/pt-decl.h @@ -45,7 +45,7 @@ { public: - typedef void (*eval_fcn) (tree_decl_elt &, bool); + typedef void (*eval_fcn) (tree_decl_elt &); tree_decl_elt (tree_identifier *i = 0, tree_expression *e = 0) : id (i), expr (e) { } @@ -95,7 +95,7 @@ } } - void eval (tree_decl_elt::eval_fcn, bool); + void eval (tree_decl_elt::eval_fcn); void accept (tree_walker& tw); @@ -169,6 +169,8 @@ private: + static void do_init (tree_decl_elt& elt); + // No copying! tree_global_command (const tree_global_command&); @@ -195,6 +197,8 @@ private: + static void do_init (tree_decl_elt& elt); + // No copying! tree_static_command (const tree_static_command&);