Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

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