Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Alternative.cc

    raefcc3b rd3b7937  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Alternative.cc --
     7// Alternative.cc -- 
    88//
    99// Author           : Richard C. Bilson
     
    1212// Last Modified On : Sat May 16 23:54:23 2015
    1313// Update Count     : 2
    14 //
     14// 
    1515
    1616#include "Alternative.h"
     
    2020
    2121namespace ResolvExpr {
    22         Alternative::Alternative() : cost( Cost::zero ), cvtCost( Cost::zero ), expr( 0 ) {}
     22        Alternative::Alternative() : expr( 0 ) {}
    2323
    2424        Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost )
     
    3535                if ( &other == this ) return *this;
    3636                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;
    5237                return *this;
    5338        }
     
    6954                        expr->print( os, indent );
    7055                        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;
    7458                } else {
    7559                        os << "Null expression!" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.