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

Refactor Constant::from to disambiguate type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Constant.cc

    r7b93757 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.