From ab8da360f8e6b5373f39b44ec754d5e6549f6819 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sun, 28 Jan 2024 23:02:11 +0100 Subject: [PATCH] Made true color detection method static --- src/utils.cpp | 2 +- src/utils.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 34eba14..1b3be38 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -60,7 +60,7 @@ void term::progress(int prefixlen, *_out << ' ' << std::setw(3) << perc << '%'; } -bool term::has_truecolor() const { +bool term::has_truecolor() { char* tc = getenv("COLORTERM"); std::string colorterm {tc ? tc : ""}; return colorterm.size() > 0 && (colorterm == "truecolor" || colorterm == "24bit"); diff --git a/src/utils.hpp b/src/utils.hpp index eced5ad..e4c6467 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -25,7 +25,7 @@ namespace sc { double cur, double total) const; - bool has_truecolor() const; + static bool has_truecolor(); }; class cursor_hider {