From 34a5659bcb6e2f4469cc2653c5335f0ec0e88286 Mon Sep 17 00:00:00 2001 From: Johannes Kapfhammer Date: Thu, 10 Oct 2019 16:02:07 +0200 Subject: [PATCH] remove colors_enabled variable --- include/bits/soi-dbg.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/bits/soi-dbg.hpp b/include/bits/soi-dbg.hpp index fbde5ab..6ba3cce 100644 --- a/include/bits/soi-dbg.hpp +++ b/include/bits/soi-dbg.hpp @@ -94,6 +94,7 @@ template 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 = "";