Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    r7e003011 r89e6ffc  
    3030///     std::cout << "type inst " << destAsTypeInst->get_name();
    3131                        if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
    32                                 if ( eqvClass.type ) {
    33                                         return conversionCost( src, eqvClass.type, indexer, env );
    34                                 } else {
    35                                         return Cost::infinity;
    36                                 }
     32                                return conversionCost( src, eqvClass.type, indexer, env );
    3733                        } else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
    3834///       std::cout << " found" << std::endl;
     
    149145        };
    150146
    151         void ConversionCost::visit( __attribute((unused)) VoidType *voidType ) {
     147        void ConversionCost::visit(VoidType *voidType) {
    152148                cost = Cost::infinity;
    153149        }
     
    186182        }
    187183
    188         void ConversionCost::visit(__attribute((unused)) ArrayType *arrayType) {}
    189         void ConversionCost::visit(__attribute((unused)) FunctionType *functionType) {}
     184        void ConversionCost::visit(ArrayType *arrayType) {
     185        }
     186
     187        void ConversionCost::visit(FunctionType *functionType) {
     188        }
    190189
    191190        void ConversionCost::visit(StructInstType *inst) {
     
    205204        }
    206205
    207         void ConversionCost::visit( __attribute((unused)) EnumInstType *inst ) {
     206        void ConversionCost::visit(EnumInstType *inst) {
    208207                static Type::Qualifiers q;
    209208                static BasicType integer( q, BasicType::SignedInt );
     
    214213        }
    215214
    216         void ConversionCost::visit( __attribute((unused)) TraitInstType *inst) {
     215        void ConversionCost::visit(TraitInstType *inst) {
    217216        }
    218217
     
    236235        }
    237236
    238         void ConversionCost::visit( __attribute((unused)) TupleType *tupleType) {
     237        void ConversionCost::visit(TupleType *tupleType) {
    239238                Cost c;
    240239                if ( TupleType *destAsTuple = dynamic_cast< TupleType* >( dest ) ) {
    241240                        std::list< Type* >::const_iterator srcIt = tupleType->get_types().begin();
    242241                        std::list< Type* >::const_iterator destIt = destAsTuple->get_types().begin();
    243                         while ( srcIt != tupleType->get_types().end() && destIt != destAsTuple->get_types().end() ) {
     242                        while ( srcIt != tupleType->get_types().end() ) {
    244243                                Cost newCost = conversionCost( *srcIt++, *destIt++, indexer, env );
    245244                                if ( newCost == Cost::infinity ) {
     
    256255        }
    257256
    258         void ConversionCost::visit( __attribute((unused)) VarArgsType *varArgsType) {
     257        void ConversionCost::visit(VarArgsType *varArgsType) {
    259258                if ( dynamic_cast< VarArgsType* >( dest ) ) {
    260259                        cost = Cost::zero;
     
    262261        }
    263262
    264         void ConversionCost::visit( __attribute((unused)) ZeroType *zeroType) {
     263        void ConversionCost::visit(ZeroType *zeroType) {
    265264                if ( dynamic_cast< ZeroType* >( dest ) ) {
    266265                        cost = Cost::zero;
     
    278277        }
    279278
    280         void ConversionCost::visit( __attribute((unused)) OneType *oneType) {
     279        void ConversionCost::visit(OneType *oneType) {
    281280                if ( dynamic_cast< OneType* >( dest ) ) {
    282281                        cost = Cost::zero;
Note: See TracChangeset for help on using the changeset viewer.