Tabular counters: fix dangling reference to color_output_.

This commit is contained in:
Joao Paulo Magalhaes 2017-03-02 12:10:06 +00:00
parent 0de985ae9d
commit cbb2eb83d1

View file

@ -41,11 +41,11 @@ bool ConsoleReporter::ReportContext(const Context& context) {
PrintBasicContext(&GetErrorStream(), context); PrintBasicContext(&GetErrorStream(), context);
#ifdef BENCHMARK_OS_WINDOWS #ifdef BENCHMARK_OS_WINDOWS
if (color_output_ && &std::cout != &GetOutputStream()) { if ((output_options_ & OO_Color) && &std::cout != &GetOutputStream()) {
GetErrorStream() GetErrorStream()
<< "Color printing is only supported for stdout on windows." << "Color printing is only supported for stdout on windows."
" Disabling color printing\n"; " Disabling color printing\n";
color_output_ = false; output_options_ &= ~OO_Color;
} }
#endif #endif