diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-20 02:10:40 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-20 02:10:40 -0500 |
commit | 22505d9527edce59cd3cf90c5241e4bd809eb8a2 (patch) | |
tree | d943b2dba416a9fbe8619e02a293dfd854fd0869 /src/utils.cc | |
parent | df11ecbbd733068284a19369949bcaa20b0e6e76 (diff) | |
download | fork-ledger-22505d9527edce59cd3cf90c5241e4bd809eb8a2.tar.gz fork-ledger-22505d9527edce59cd3cf90c5241e4bd809eb8a2.tar.bz2 fork-ledger-22505d9527edce59cd3cf90c5241e4bd809eb8a2.zip |
Always call TRACE_CTOR at the end of constructors
Diffstat (limited to 'src/utils.cc')
-rw-r--r-- | src/utils.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/utils.cc b/src/utils.cc index 5a364008..17118904 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -278,16 +278,18 @@ namespace { buf << num; + string number(buf.str()); + int integer_digits = 0; // Count the number of integer digits - for (const char * p = buf.str().c_str(); *p; p++) { + for (const char * p = number.c_str(); *p; p++) { if (*p == '.') break; else if (*p != '-') integer_digits++; } - for (const char * p = buf.str().c_str(); *p; p++) { + for (const char * p = number.c_str(); *p; p++) { if (*p == '.') { obuf << *p; assert(integer_digits <= 3); @@ -335,7 +337,7 @@ namespace { void report_count_map(std::ostream& out, object_count_map& the_map) { foreach (object_count_map::value_type& pair, the_map) { - out << " " << std::right << std::setw(12); + out << " " << std::right << std::setw(18); stream_commified_number(out, pair.second.first); out << " " << std::right << std::setw(7); stream_memory_size(out, pair.second.second); @@ -433,7 +435,7 @@ void report_memory(std::ostream& out, bool report_all) out << "Live memory:" << std::endl; foreach (const memory_map::value_type& pair, *live_memory) { - out << " " << std::right << std::setw(12) << pair.first + out << " " << std::right << std::setw(18) << pair.first << " " << std::right << std::setw(7); stream_memory_size(out, pair.second.second); out << " " << std::left << pair.second.first @@ -455,7 +457,7 @@ void report_memory(std::ostream& out, bool report_all) out << "Live objects:" << std::endl; foreach (const objects_map::value_type& pair, *live_objects) { - out << " " << std::right << std::setw(12) << pair.first + out << " " << std::right << std::setw(18) << pair.first << " " << std::right << std::setw(7); stream_memory_size(out, pair.second.second); out << " " << std::left << pair.second.first |