diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 830220ef..e1108a0a 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -147,6 +147,7 @@ enum level_enum err = SPDLOG_LEVEL_ERROR, critical = SPDLOG_LEVEL_CRITICAL, off = SPDLOG_LEVEL_OFF, + n_levels }; #if !defined(SPDLOG_LEVEL_NAMES) diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index 16433019..f81c40ac 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace spdlog { namespace sinks { @@ -80,7 +80,7 @@ private: mutex_t &mutex_; bool should_do_colors_; std::unique_ptr formatter_; - std::unordered_map colors_; + std::array colors_; void print_ccode_(const string_view_t &color_code); void print_range_(const memory_buf_t &formatted, size_t start, size_t end); };