Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.h

    r7870799 r3c89751  
    3333        class TypeEnvironment;
    3434
    35         typedef std::function<Cost(const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;
     35        typedef std::function<Cost(Type *, Type *, const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;
    3636        struct ConversionCost : public WithShortCircuiting {
    3737          public:
    38                 ConversionCost( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );
     38                ConversionCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );
    3939
    4040                Cost get_cost() const { return cost; }
    4141
    42                 void previsit( const BaseSyntaxNode * ) { visit_children = false; }
     42                void previsit( BaseSyntaxNode * ) { visit_children = false; }
    4343
    44                 void postvisit( const VoidType * voidType );
    45                 void postvisit( const BasicType * basicType );
    46                 void postvisit( const PointerType * pointerType );
    47                 void postvisit( const ArrayType * arrayType );
    48                 void postvisit( const ReferenceType * refType );
    49                 void postvisit( const FunctionType * functionType );
    50                 void postvisit( const StructInstType * aggregateUseType );
    51                 void postvisit( const UnionInstType * aggregateUseType );
    52                 void postvisit( const EnumInstType * aggregateUseType );
    53                 void postvisit( const TraitInstType * aggregateUseType );
    54                 void postvisit( const TypeInstType * aggregateUseType );
    55                 void postvisit( const TupleType * tupleType );
    56                 void postvisit( const VarArgsType * varArgsType );
    57                 void postvisit( const ZeroType * zeroType );
    58                 void postvisit( const OneType * oneType );
     44                void postvisit( VoidType * voidType );
     45                void postvisit( BasicType * basicType );
     46                void postvisit( PointerType * pointerType );
     47                void postvisit( ArrayType * arrayType );
     48                void postvisit( ReferenceType * refType );
     49                void postvisit( FunctionType * functionType );
     50                void postvisit( StructInstType * aggregateUseType );
     51                void postvisit( UnionInstType * aggregateUseType );
     52                void postvisit( EnumInstType * aggregateUseType );
     53                void postvisit( TraitInstType * aggregateUseType );
     54                void postvisit( TypeInstType * aggregateUseType );
     55                void postvisit( TupleType * tupleType );
     56                void postvisit( VarArgsType * varArgsType );
     57                void postvisit( ZeroType * zeroType );
     58                void postvisit( OneType * oneType );
    5959          protected:
    60                 const Type * dest;
     60                Type *dest;
    6161                const SymTab::Indexer &indexer;
    6262                Cost cost;
     
    6565        };
    6666
    67         typedef std::function<int(const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment &)> PtrsFunction;
    68         Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );
     67        typedef std::function<int(Type *, Type *, const SymTab::Indexer &, const TypeEnvironment &)> PtrsFunction;
     68        Cost convertToReferenceCost( Type * src, ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );
    6969
    7070// Some function pointer types, differ in return type.
Note: See TracChangeset for help on using the changeset viewer.