Ignore:
Timestamp:
May 11, 2016, 1:09:33 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
af18713
Parents:
7b937575
Message:

Refactor Constant::from to disambiguate type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Constant.cc

    r7b937575 rcb4c607  
    3030Constant::~Constant() { delete type; }
    3131
    32 Constant Constant::from( int i ) {
     32Constant Constant::from_int( int i ) {
    3333        return Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), std::to_string( i ) );
    3434}
    3535
    36 Constant Constant::from( unsigned long i ) {
     36Constant Constant::from_ulong( unsigned long i ) {
    3737        return Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), std::to_string( i ) );
    3838}
    3939
    40 Constant Constant::from( double d ) {
     40Constant Constant::from_double( double d ) {
    4141        return Constant( new BasicType( Type::Qualifiers(), BasicType::Double ), std::to_string( d ) );
    4242}
Note: See TracChangeset for help on using the changeset viewer.