From c1a524a96955b980f9ede2bd1cb558829af43046 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 19 Aug 2019 12:20:13 +0300 Subject: [PATCH] Fixed clang-tidy warnings --- include/spdlog/details/registry-inl.h | 1 - include/spdlog/details/thread_pool.h | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index 5b3d1dc7..d19e1f15 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -32,7 +32,6 @@ namespace details { SPDLOG_INLINE registry::registry() : formatter_(new pattern_formatter()) - , level_(spdlog::level::info) { #ifndef SPDLOG_DISABLE_DEFAULT_LOGGER diff --git a/include/spdlog/details/thread_pool.h b/include/spdlog/details/thread_pool.h index ffc46d61..ff022082 100644 --- a/include/spdlog/details/thread_pool.h +++ b/include/spdlog/details/thread_pool.h @@ -31,20 +31,16 @@ enum class async_msg_type // Movable only. should never be copied struct async_msg { - async_msg_type msg_type; - level::level_enum level; + async_msg_type msg_type {async_msg_type::log}; + level::level_enum level {level::info}; log_clock::time_point time; - size_t thread_id; + size_t thread_id {0}; fmt::basic_memory_buffer raw; source_loc source; async_logger_ptr worker_ptr; - async_msg() - : msg_type(async_msg_type::log) - , level(level::info) - , thread_id(0) - {} + async_msg() = default; ~async_msg() = default; // should only be moved in or out of the queue..