Ignore:
Timestamp:
May 7, 2019, 2:36:10 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
3c1fa71, b1d3ee1
Parents:
9e6d652
Message:

choose integral zero over nullptr for any integral context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cc

    r9e6d652 r1c9568f  
     1#include <algorithm>
    12#include <queue>
    23#include <iostream>
     
    340341        } // for
    341342        code << "\t}; // costMatrix" << endl;
     343
     344        // maximum conversion cost from int
     345        code << "\tstatic const int maxIntCost = " << *max_element(costMatrix[SignedInt], costMatrix[SignedInt] + NUMBER_OF_BASIC_TYPES) << ";" << endl;
    342346        code << "\t";                                                                           // indentation for end marker
    343 
     347       
    344348        if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", ConversionCost );
    345349        if ( (end = str.find( STARTMK, start + 1 )) == string::npos ) Abort( "start", ConversionCost );
Note: See TracChangeset for help on using the changeset viewer.