aboutsummaryrefslogtreecommitdiff
path: root/src/console_reporter.cc
diff options
context:
space:
mode:
authorJoao Paulo Magalhaes <dev@jpmag.me>2017-04-27 19:22:36 +0100
committerJoao Paulo Magalhaes <dev@jpmag.me>2017-04-27 19:22:36 +0100
commit409f35da50c3f2db5a8187ea1fb98342bddaa317 (patch)
treeeeeeba5a356cc755bbcf5da0c1c2a0390a0de420 /src/console_reporter.cc
parent2d1a34626fec7db18e7198aad9e2b2439e1bf186 (diff)
downloadgoogle-benchmark-409f35da50c3f2db5a8187ea1fb98342bddaa317.tar.gz
User counters: fix misplaced newline in console reporter header.
Diffstat (limited to 'src/console_reporter.cc')
-rw-r--r--src/console_reporter.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/console_reporter.cc b/src/console_reporter.cc
index 3f3de02..e1044cd 100644
--- a/src/console_reporter.cc
+++ b/src/console_reporter.cc
@@ -53,11 +53,10 @@ bool ConsoleReporter::ReportContext(const Context& context) {
void ConsoleReporter::PrintHeader(const Run& run) {
std::string str =
- FormatString("%-*s %13s %13s %10s\n", static_cast<int>(name_field_width_),
- "Benchmark", "Time", "CPU", "Iterations");
- if(!run.counters.empty()) {
- str += " UserCounters...";
- }
+ FormatString("%-*s %13s %13s %10s%s\n", static_cast<int>(name_field_width_),
+ "Benchmark", "Time", "CPU", "Iterations",
+ (run.counters.empty() ? "" : " UserCounters...")
+ );
std::string line = std::string(str.length(), '-');
GetOutputStream() << line << "\n" << str << line << "\n";
}