Fix bad merge which caused the benchmark name to be printed twice
diff --git a/src/console_reporter.cc b/src/console_reporter.cc
index 2b1f281..3944666 100644
--- a/src/console_reporter.cc
+++ b/src/console_reporter.cc
@@ -100,11 +100,14 @@
}
void ConsoleReporter::PrintRunData(const Run& result) {
- ColorPrintf(COLOR_GREEN, "%-*s ",
- name_field_width_, result.benchmark_name.c_str());
+ auto name_color = (result.report_big_o || result.report_rms)
+ ? COLOR_BLUE : COLOR_GREEN;
+ ColorPrintf(name_color, "%-*s ", name_field_width_,
+ result.benchmark_name.c_str());
if (result.error_occurred) {
- ColorPrintf(COLOR_RED, "ERROR OCCURRED: \'%s\'", result.error_message.c_str());
+ ColorPrintf(COLOR_RED, "ERROR OCCURRED: \'%s\'",
+ result.error_message.c_str());
ColorPrintf(COLOR_DEFAULT, "\n");
return;
}
@@ -125,10 +128,6 @@
const char* timeLabel;
std::tie(timeLabel, multiplier) = GetTimeUnitAndMultiplier(result.time_unit);
- ColorPrintf((result.report_big_o ||result.report_rms) ? COLOR_BLUE :
- COLOR_GREEN, "%-*s ",
- name_field_width_, result.benchmark_name.c_str());
-
if(result.report_big_o) {
std::string big_o = result.report_big_o ? GetBigO(result.complexity) : "";
ColorPrintf(COLOR_YELLOW, "%10.4f %s %10.4f %s ",