Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

    r1521de20 r543159b  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 06:57:43 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Oct 05 14:48:45 2015
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 06:59:10 2015
     13// Update Count     : 2
    1414//
    1515
     
    5656                                return Cost::infinity;
    5757                        } else {
    58                                 // xxx - why are we adding cost 0 here?
    5958                                return converter.get_cost() + Cost( 0, 0, 0 );
    6059                        } // if
     
    8382                                newEnv.add( pointerType->get_forall() );
    8483                                newEnv.add( pointerType->get_base()->get_forall() );
    85                                 int castResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
    86                                 if ( castResult > 0 ) {
     84                                int assignResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
     85                                if ( assignResult > 0 ) {
    8786                                        cost = Cost( 0, 0, 1 );
    88                                 } else if ( castResult < 0 ) {
     87                                } else if ( assignResult < 0 ) {
    8988                                        cost = Cost( 1, 0, 0 );
    9089                                } // if
Note: See TracChangeset for help on using the changeset viewer.