Changeset d3e4d6c for src/ResolvExpr/Alternative.cc
- Timestamp:
- Aug 23, 2017, 6:22:07 PM (8 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:
- 87e08e24, cb811ac
- Parents:
- 9f07232 (diff), bd37119 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Alternative.cc
r9f07232 rd3e4d6c 34 34 : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ) {} 35 35 36 Alternative::Alternative( const Alternative &other ) { 37 initialize( other, *this ); 36 Alternative::Alternative( const Alternative &other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( maybeClone( other.expr ) ), env( other.env ) { 38 37 } 39 38 40 39 Alternative &Alternative::operator=( const Alternative &other ) { 41 40 if ( &other == this ) return *this; 42 initialize( other, *this ); 41 delete expr; 42 cost = other.cost; 43 cvtCost = other.cvtCost; 44 expr = maybeClone( other.expr ); 45 env = other.env; 43 46 return *this; 44 47 } … … 57 60 other.expr = nullptr; 58 61 return *this; 59 }60 61 void Alternative::initialize( const Alternative &src, Alternative &dest ) {62 dest.cost = src.cost;63 dest.cvtCost = src.cvtCost;64 dest.expr = maybeClone( src.expr );65 dest.env = src.env;66 62 } 67 63
Note:
See TracChangeset
for help on using the changeset viewer.