From bde4c7149f1a79a692ef9247c600b4f7b1432e8e Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 7 Jul 2018 13:38:15 +0300 Subject: [PATCH] Renamed traits to console globals --- .../spdlog/details/{traits.h => console_globals.h} | 8 ++++---- include/spdlog/sinks/ansicolor_sink.h | 11 ++++++----- include/spdlog/sinks/wincolor_sink.h | 10 +++++----- 3 files changed, 15 insertions(+), 14 deletions(-) rename include/spdlog/details/{traits.h => console_globals.h} (87%) diff --git a/include/spdlog/details/traits.h b/include/spdlog/details/console_globals.h similarity index 87% rename from include/spdlog/details/traits.h rename to include/spdlog/details/console_globals.h index d494cf73..58f86a95 100644 --- a/include/spdlog/details/traits.h +++ b/include/spdlog/details/console_globals.h @@ -7,7 +7,7 @@ #include "stdio.h" namespace spdlog { namespace details { -struct console_stdout_trait +struct console_stdout_stream { static FILE *stream() { @@ -21,7 +21,7 @@ struct console_stdout_trait #endif }; -struct console_stderr_trait +struct console_stderr_stream { static FILE *stream() { @@ -35,7 +35,7 @@ struct console_stderr_trait #endif }; -struct console_mutex_trait +struct console_global_mutex { using mutex_t = std::mutex; static mutex_t &console_mutex() @@ -45,7 +45,7 @@ struct console_mutex_trait } }; -struct console_null_mutex_trait +struct console_global_nullmutex { using mutex_t = null_mutex; static mutex_t &console_mutex() diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index d817dffb..f72f6196 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -7,7 +7,7 @@ #include "spdlog/details/null_mutex.h" #include "spdlog/details/os.h" -#include "spdlog/details/traits.h" +#include "spdlog/details/console_globals.h" #include #include @@ -132,10 +132,11 @@ private: std::unordered_map colors_; }; -using ansicolor_stdout_sink_mt = ansicolor_sink; -using ansicolor_stdout_sink_st = ansicolor_sink; -using ansicolor_stderr_sink_mt = ansicolor_sink; -using ansicolor_stderr_sink_st = ansicolor_sink; +using ansicolor_stdout_sink_mt = ansicolor_sink; +using ansicolor_stdout_sink_st = ansicolor_sink; + +using ansicolor_stderr_sink_mt = ansicolor_sink; +using ansicolor_stderr_sink_st = ansicolor_sink; } // namespace sinks diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index 9b93dc13..b4604e35 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -8,7 +8,7 @@ #include "../fmt/fmt.h" #include "spdlog/common.h" #include "spdlog/details/null_mutex.h" -#include "spdlog/details/traits.h" +#include "spdlog/details/console_globals.h" #include "spdlog/sinks/sink.h" #include @@ -116,11 +116,11 @@ private: std::unordered_map colors_; }; -using wincolor_stdout_sink_mt = wincolor_sink; -using wincolor_stdout_sink_st = wincolor_sink; +using wincolor_stdout_sink_mt = wincolor_sink; +using wincolor_stdout_sink_st = wincolor_sink; -using wincolor_stderr_sink_mt = wincolor_sink; -using wincolor_stderr_sink_st = wincolor_sink; +using wincolor_stderr_sink_mt = wincolor_sink; +using wincolor_stderr_sink_st = wincolor_sink; } // namespace sinks } // namespace spdlog