@@ -246,7 +246,14 @@ namespace
246246 }
247247
248248 stream_colour_fn colour;
249- colour = is_coloured ? termcolor::red : termcolor::bright_white;
249+ if (is_coloured)
250+ {
251+ colour = termcolor::red;
252+ }
253+ else
254+ {
255+ colour = termcolor::bright_white;
256+ }
250257
251258 std::sort (untracked_items.begin (), untracked_items.end ());
252259 for (const auto & it : untracked_items)
@@ -425,7 +432,14 @@ void print_tracking_info(repository_wrapper& repo, status_list_wrapper& sl, bool
425432void print_tobecommited (status_list_wrapper& sl, std::set<std::string> tracked_dir_set, bool is_long, bool is_coloured)
426433{
427434 stream_colour_fn colour;
428- colour = is_coloured ? termcolor::green : termcolor::bright_white;
435+ if (is_coloured)
436+ {
437+ colour = termcolor::green;
438+ }
439+ else
440+ {
441+ colour = termcolor::bright_white;
442+ }
429443
430444 if (is_long)
431445 {
@@ -461,7 +475,14 @@ void print_tobecommited(status_list_wrapper& sl, std::set<std::string> tracked_d
461475void print_notstagged (status_list_wrapper& sl, std::set<std::string> tracked_dir_set, bool is_long, bool is_coloured)
462476{
463477 stream_colour_fn colour;
464- colour = is_coloured ? termcolor::red : termcolor::bright_white;
478+ if (is_coloured)
479+ {
480+ colour = termcolor::red;
481+ }
482+ else
483+ {
484+ colour = termcolor::bright_white;
485+ }
465486
466487 if (is_long)
467488 {
@@ -502,7 +523,14 @@ void print_unmerged(
502523)
503524{
504525 stream_colour_fn colour;
505- colour = is_coloured ? termcolor::red : termcolor::bright_white;
526+ if (is_coloured)
527+ {
528+ colour = termcolor::red;
529+ }
530+ else
531+ {
532+ colour = termcolor::bright_white;
533+ }
506534
507535 if (is_long)
508536 {
0 commit comments