From 1ab59c4237f0acf9a6fc02d973bf3b3e0d610931 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 7 Dec 2024 14:47:03 +0200 Subject: [PATCH] set level to uint8_t --- include/spdlog/common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 8b70901f..bb8b5663 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "./source_loc.h" @@ -73,7 +74,7 @@ using format_string_t = fmt::format_string; #endif // Log level enum -enum class level { +enum class level : std::uint8_t { trace = SPDLOG_LEVEL_TRACE, debug = SPDLOG_LEVEL_DEBUG, info = SPDLOG_LEVEL_INFO, @@ -81,7 +82,7 @@ enum class level { err = SPDLOG_LEVEL_ERROR, critical = SPDLOG_LEVEL_CRITICAL, off = SPDLOG_LEVEL_OFF, - n_levels + n_levels = SPDLOG_LEVEL_OFF + 1 }; using atomic_level_t = std::atomic;