Changeset 99d4584 for src/Common/Indenter.h
- Timestamp:
- Jun 5, 2019, 5:58:38 PM (5 years ago)
- 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:
- 3cd5fdd
- Parents:
- 2a8f0c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/Indenter.h
r2a8f0c1 r99d4584 18 18 19 19 struct Indenter { 20 static unsigned tabsize; 20 static unsigned tabsize; ///< default number of spaces in one level of indentation 21 21 22 Indenter( unsigned int amt = tabsize, unsigned int indent = 0 ) : amt( amt ), indent( indent ) {} 23 unsigned int amt; // amount 1 level increases indent by (i.e. how much to increase by in operator++) 24 unsigned int indent; 22 unsigned int indent; ///< number of spaces to indent 23 unsigned int amt; ///< spaces in one level of indentation 25 24 25 Indenter( unsigned int indent = 0, unsigned int amt = tabsize ) 26 : indent( indent*amt ), amt( amt ) {} 27 26 28 Indenter & operator+=(int nlevels) { indent += amt*nlevels; return *this; } 27 29 Indenter & operator-=(int nlevels) { indent -= amt*nlevels; return *this; }
Note: See TracChangeset
for help on using the changeset viewer.