Changeset 89be1c68 for src/ResolvExpr/Alternative.cc
- Timestamp:
- Jul 17, 2017, 2:35:52 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 7ebaa56
- Parents:
- b46e3bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Alternative.cc
rb46e3bd r89be1c68 28 28 : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ) {} 29 29 30 Alternative::Alternative( const Alternative &other ) { 31 initialize( other, *this ); 30 Alternative::Alternative( const Alternative &other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( maybeClone( other.expr ) ), env( other.env ) { 32 31 } 33 32 34 33 Alternative &Alternative::operator=( const Alternative &other ) { 35 34 if ( &other == this ) return *this; 36 initialize( other, *this ); 35 delete expr; 36 cost = other.cost; 37 cvtCost = other.cvtCost; 38 expr = maybeClone( other.expr ); 39 env = other.env; 37 40 return *this; 38 41 } … … 51 54 other.expr = nullptr; 52 55 return *this; 53 }54 55 void Alternative::initialize( const Alternative &src, Alternative &dest ) {56 dest.cost = src.cost;57 dest.cvtCost = src.cvtCost;58 dest.expr = maybeClone( src.expr );59 dest.env = src.env;60 56 } 61 57
Note: See TracChangeset
for help on using the changeset viewer.