Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ApplicationExpr.cc

    r4d6d62e r8d7bef2  
    1717#include <list>                  // for list
    1818#include <map>                   // for _Rb_tree_const_iterator, map, map<>:...
    19 #include <memory>                // for unique_ptr
    2019#include <ostream>               // for operator<<, ostream, basic_ostream
    2120#include <string>                // for operator<<, string, char_traits
     
    4342}
    4443
    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 
    7444ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list<Expression *> & args ) : function( funcExpr ), args( args ) {
    7545        PointerType *pointer = strict_dynamic_cast< PointerType* >( funcExpr->get_result() );
     
    8454                Expression( other ), function( maybeClone( other.function ) ) {
    8555        cloneAll( other.args, args );
    86 }
    87 
    88 ApplicationExpr::~ApplicationExpr() {
    89         delete function;
    90         deleteAll( args );
    9156}
    9257
Note: See TracChangeset for help on using the changeset viewer.