Changes in src/SynTree/ApplicationExpr.cc [8d7bef2:4d6d62e]
- File:
-
- 1 edited
-
src/SynTree/ApplicationExpr.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ApplicationExpr.cc
r8d7bef2 r4d6d62e 17 17 #include <list> // for list 18 18 #include <map> // for _Rb_tree_const_iterator, map, map<>:... 19 #include <memory> // for unique_ptr 19 20 #include <ostream> // for operator<<, ostream, basic_ostream 20 21 #include <string> // for operator<<, string, char_traits … … 42 43 } 43 44 45 ParamEntry::~ParamEntry() { 46 delete actualType; 47 delete formalType; 48 delete expr; 49 } 50 51 ParamEntry::ParamEntry( ParamEntry && other ) : 52 decl( other.decl ), actualType( other.actualType ), formalType( other.formalType ), expr( other.expr ), inferParams( std::move( other.inferParams ) ) { 53 other.actualType = nullptr; 54 other.formalType = nullptr; 55 other.expr = nullptr; 56 } 57 58 ParamEntry & ParamEntry::operator=( ParamEntry && other ) { 59 if ( &other == this ) return *this; 60 delete actualType; 61 delete formalType; 62 delete expr; 63 decl = other.decl; 64 actualType = other.actualType; 65 formalType = other.formalType; 66 expr = other.expr; 67 other.actualType = nullptr; 68 other.formalType = nullptr; 69 other.expr = nullptr; 70 inferParams = std::move( other.inferParams ); 71 return *this; 72 } 73 44 74 ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list<Expression *> & args ) : function( funcExpr ), args( args ) { 45 75 PointerType *pointer = strict_dynamic_cast< PointerType* >( funcExpr->get_result() ); … … 54 84 Expression( other ), function( maybeClone( other.function ) ) { 55 85 cloneAll( other.args, args ); 86 } 87 88 ApplicationExpr::~ApplicationExpr() { 89 delete function; 90 deleteAll( args ); 56 91 } 57 92
Note:
See TracChangeset
for help on using the changeset viewer.