Changes in src/SynTree/ApplicationExpr.cc [4d6d62e:8d7bef2]
- File:
-
- 1 edited
-
src/SynTree/ApplicationExpr.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ApplicationExpr.cc
r4d6d62e r8d7bef2 17 17 #include <list> // for list 18 18 #include <map> // for _Rb_tree_const_iterator, map, map<>:... 19 #include <memory> // for unique_ptr20 19 #include <ostream> // for operator<<, ostream, basic_ostream 21 20 #include <string> // for operator<<, string, char_traits … … 43 42 } 44 43 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 74 44 ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list<Expression *> & args ) : function( funcExpr ), args( args ) { 75 45 PointerType *pointer = strict_dynamic_cast< PointerType* >( funcExpr->get_result() ); … … 84 54 Expression( other ), function( maybeClone( other.function ) ) { 85 55 cloneAll( other.args, args ); 86 }87 88 ApplicationExpr::~ApplicationExpr() {89 delete function;90 deleteAll( args );91 56 } 92 57
Note:
See TracChangeset
for help on using the changeset viewer.