From b3402a0b9f68357986fe827000b966f6bdb4e76e Mon Sep 17 00:00:00 2001 From: gabime Date: Wed, 4 Mar 2020 16:08:35 +0200 Subject: [PATCH] Fix tidy warning --- include/spdlog/details/os-inl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index d77aab11..1b479c33 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -390,13 +390,13 @@ SPDLOG_INLINE int pid() SPDLOG_NOEXCEPT } // Determine if the terminal supports colors -// Source: https://github.com/agauniyal/rang/ +// Based on: https://github.com/agauniyal/rang/ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { #ifdef _WIN32 return true; #else - static constexpr std::array Terms = { + static constexpr std::array terms = { {"ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm"}}; const char *env_p = std::getenv("TERM"); @@ -406,7 +406,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT } static const bool result = - std::any_of(std::begin(Terms), std::end(Terms), [&](const char *term) { return std::strstr(env_p, term) != nullptr; }); + std::any_of(terms.begin(), terms.end(), [&](const char *term) { return std::strstr(env_p, term) != nullptr; }); return result; #endif }