Changes in src/ResolvExpr/Alternative.cc [aefcc3b:d3b7937]
- File:
-
- 1 edited
-
src/ResolvExpr/Alternative.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Alternative.cc
raefcc3b rd3b7937 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Alternative.cc -- 7 // Alternative.cc -- 8 8 // 9 9 // Author : Richard C. Bilson … … 12 12 // Last Modified On : Sat May 16 23:54:23 2015 13 13 // Update Count : 2 14 // 14 // 15 15 16 16 #include "Alternative.h" … … 20 20 21 21 namespace ResolvExpr { 22 Alternative::Alternative() : cost( Cost::zero ), cvtCost( Cost::zero ),expr( 0 ) {}22 Alternative::Alternative() : expr( 0 ) {} 23 23 24 24 Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost ) … … 35 35 if ( &other == this ) return *this; 36 36 initialize( other, *this ); 37 return *this;38 }39 40 Alternative::Alternative( Alternative && other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( other.expr ), env( other.env ) {41 other.expr = nullptr;42 }43 44 Alternative & Alternative::operator=( Alternative && other ) {45 if ( &other == this ) return *this;46 delete expr;47 cost = other.cost;48 cvtCost = other.cvtCost;49 expr = other.expr;50 env = other.env;51 other.expr = nullptr;52 37 return *this; 53 38 } … … 69 54 expr->print( os, indent ); 70 55 os << "(types:" << std::endl; 71 os << std::string( indent+4, ' ' ); 72 expr->get_result()->print( os, indent + 4 ); 73 os << std::endl << ")" << std::endl; 56 printAll( expr->get_results(), os, indent + 4 ); 57 os << ")" << std::endl; 74 58 } else { 75 59 os << "Null expression!" << std::endl;
Note:
See TracChangeset
for help on using the changeset viewer.