Ignore:
Timestamp:
Jun 7, 2019, 2:54:34 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
ef75948
Parents:
5684736
Message:

Fixed indentation and remove too strict abort

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Indenter.h

    r5684736 r4e5e6cc  
    2323        unsigned int amt;         ///< spaces in one level of indentation
    2424
    25         Indenter( unsigned int indent = 0, unsigned int amt = tabsize ) 
    26         : indent( indent*amt ), amt( amt ) {}
    27        
    28         Indenter & operator+=(int nlevels) { indent += amt*nlevels; return *this; }
    29         Indenter & operator-=(int nlevels) { indent -= amt*nlevels; return *this; }
     25        Indenter( unsigned int indent = 0, unsigned int amt = tabsize )
     26        : indent( indent ), amt( amt ) {}
     27
     28        Indenter & operator+=(int nlevels) { indent += nlevels; return *this; }
     29        Indenter & operator-=(int nlevels) { indent -= nlevels; return *this; }
    3030        Indenter operator+(int nlevels) { Indenter indenter = *this; return indenter += nlevels; }
    3131        Indenter operator-(int nlevels) { Indenter indenter = *this; return indenter -= nlevels; }
     
    3535
    3636inline std::ostream & operator<<( std::ostream & out, const Indenter & indent ) {
    37         return out << std::string(indent.indent, ' ');
     37        return out << std::string(indent.indent * indent.amt, ' ');
    3838}
    3939
Note: See TracChangeset for help on using the changeset viewer.