Changeset 1e8bbac9


Ignore:
Timestamp:
Dec 1, 2017, 2:53:04 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d8893ca
Parents:
55d6e8de
Message:

Refactor printAlts into AlternativeFinder?.h

Location:
src/ResolvExpr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r55d6e8de r1e8bbac9  
    8383        }
    8484
     85        void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt ) {
     86                Indenter indent = { Indenter::tabsize, indentAmt };
     87                for ( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
     88                        i->print( os, indent );
     89                        os << std::endl;
     90                }
     91        }
     92
    8593        namespace {
    86                 void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt = 0 ) {
    87                         Indenter indent = { Indenter::tabsize, indentAmt };
    88                         for ( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
    89                                 i->print( os, indent );
    90                                 os << std::endl;
    91                         }
    92                 }
    93 
    9494                void makeExprList( const AltList &in, std::list< Expression* > &out ) {
    9595                        for ( AltList::const_iterator i = in.begin(); i != in.end(); ++i ) {
  • src/ResolvExpr/AlternativeFinder.h

    r55d6e8de r1e8bbac9  
    174174
    175175        Cost sumCost( const AltList &in );
     176        void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt = 0 );
    176177
    177178        template< typename InputIterator >
     
    181182                }
    182183        }
     184
    183185} // namespace ResolvExpr
    184186
Note: See TracChangeset for help on using the changeset viewer.