Changeset 1cb7fab2 for src/Common/Stats/Counter.cc
- Timestamp:
- Mar 4, 2019, 2:53:55 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 874ffa4
- Parents:
- 675716e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/Stats/Counter.cc
r675716e r1cb7fab2 27 27 size_t nc = 0; 28 28 Base::ForAll(top, 0, [&](Base::TreeImpl * node, size_t level) { 29 nc = std::max(nc, (4 * level) + node->name.size());29 nc = std::max(nc, (4 * level) + std::strlen(node->name)); 30 30 }); 31 31 32 const std::string &title = "Counter Statistic";32 const char * const title = "Counter Statistic"; 33 33 size_t nct = nc + 14; 34 34 std::cerr << std::string(nct, '=') << std::endl; 35 std::cerr << std::string((nct - title.size()) / 2, ' ');35 std::cerr << std::string((nct - std::strlen(title)) / 2, ' '); 36 36 std::cerr << title << std::endl; 37 37 std::cerr << std::string(nct, '-') << std::endl; … … 41 41 std::cerr << std::string(level * 4, ' '); 42 42 std::cerr << node->name; 43 std::cerr << std::string(nc - ((level * 4) + node->name.size()), ' ');43 std::cerr << std::string(nc - ((level * 4) + std::strlen(node->name)), ' '); 44 44 std::cerr << " | "; 45 45 std::cerr << std::setw(9); … … 52 52 } 53 53 54 Base::TreeImpl::Top top; 54 Base::TreeTop top; 55 56 extern bool enabled; 55 57 } 56 58 }
Note: See TracChangeset
for help on using the changeset viewer.