remove colors_enabled variable

This commit is contained in:
Johannes Kapfhammer 2019-10-10 16:02:07 +02:00
parent be460c5602
commit 34a5659bcb
1 changed files with 1 additions and 3 deletions

View File

@ -94,6 +94,7 @@ template <class T> std::string sanitized_type_name() {
return sanitize_type(std::string(t.data, t.size));
}
inline std::string extract_method_name(std::string const& pretty_function) {
size_t colons = pretty_function.find("::");
size_t begin = pretty_function.substr(0,colons).rfind(" ") + 1;
@ -133,7 +134,6 @@ bool are_colors_enabled() {
// ----------------------------------------------------------------------------
// init and static variables
static bool colors_enabled = false;
static const char *ANSI_DEBUG = "";
static const char *ANSI_EXPRESSION = "";
static const char *ANSI_VALUE = "";
@ -143,7 +143,6 @@ static const char *ANSI_RESET = "";
void dbg_init(bool with_colors) {
if (with_colors) {
bool colors_enabled = true;
ANSI_DEBUG = "\x1b[37m";
ANSI_EXPRESSION = "\x1b[36m";
ANSI_VALUE = "\x1b[01m";
@ -151,7 +150,6 @@ void dbg_init(bool with_colors) {
ANSI_MESSAGE = "\x1b[31;01m";
ANSI_RESET = "\x1b[0m";
} else {
bool colors_enabled = false;
ANSI_DEBUG = "";
ANSI_EXPRESSION = "";
ANSI_VALUE = "";