diff --git a/src/iomanip.cpp b/src/iomanip.cpp index b403bbe..652ac4e 100644 --- a/src/iomanip.cpp +++ b/src/iomanip.cpp @@ -25,9 +25,7 @@ static std::ostream& rgb(std::ostream& out, int r, int g, int b, int code) { } bool sc::io::should_color(const std::ostream& out) { - char* no_color_env {getenv("NO_COLOR")}; - std::string no_color {no_color_env ? no_color_env : ""}; - return no_color != "1" && isatty_ostream(out); + return !getenv("NO_COLOR") && isatty_ostream(out); } bool sc::io::isatty_ostream(const std::ostream& out) {