Changeset 2298f728 for src/Common


Ignore:
Timestamp:
Sep 24, 2016, 12:08:02 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
9c23f31
Parents:
1b77274
Message:

more refactoring of parser code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    r1b77274 r2298f728  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 16 19:13:21 2016
    13 // Update Count     : 26
     12// Last Modified On : Fri Sep 23 11:46:47 2016
     13// Update Count     : 28
    1414//
    1515
     
    102102                } // if
    103103        } // for
    104 }
    105 
    106 static inline std::string assign_strptr( const std::string *str ) {
    107         std::string tmp( *str );
    108         delete str;
    109         return tmp;
    110104}
    111105
     
    137131
    138132template < typename T >
    139 void toString_single ( std::ostream & os, const T & value ) {
     133void toString_single( std::ostream & os, const T & value ) {
    140134        os << value;
    141135}
    142136
    143137template < typename T, typename... Params >
    144 void toString_single ( std::ostream & os, const T & value, const Params & ... params ) {
     138void toString_single( std::ostream & os, const T & value, const Params & ... params ) {
    145139        os << value;
    146140        toString_single( os, params ... );
     
    148142
    149143template < typename ... Params >
    150 std::string toString ( const Params & ... params ) {
     144std::string toString( const Params & ... params ) {
    151145        std::ostringstream os;
    152146        toString_single( os, params... );
Note: See TracChangeset for help on using the changeset viewer.