From 0ef49d7df62aead109683f29cbc98d8c404ae949 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 29 Nov 2024 16:15:13 +0200 Subject: [PATCH] Minor cleanup --- example/example.cpp | 1 + include/spdlog/spdlog.h | 1 - src/sinks/base_sink.cpp | 3 +-- src/sinks/sink.cpp | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index 31f4258b..b42e9439 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -29,6 +29,7 @@ void replace_default_logger_example(); #include "spdlog/cfg/env.h" // support for loading levels from the environment variable #include "spdlog/spdlog.h" +#include "spdlog/version.h" int main(int, char *[]) { // Log levels can be loaded from argv/env using "SPDLOG_LEVEL" diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index 199e58c3..590e4a6f 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -19,7 +19,6 @@ #include "./details/registry.h" #include "./details/synchronous_factory.h" #include "./logger.h" -#include "./version.h" namespace spdlog { diff --git a/src/sinks/base_sink.cpp b/src/sinks/base_sink.cpp index 6a4f671f..c5efae8f 100644 --- a/src/sinks/base_sink.cpp +++ b/src/sinks/base_sink.cpp @@ -53,6 +53,5 @@ void spdlog::sinks::base_sink::set_formatter_(std::unique_ptr; -template class SPDLOG_API spdlog::sinks::base_sink; \ No newline at end of file +template class SPDLOG_API spdlog::sinks::base_sink; diff --git a/src/sinks/sink.cpp b/src/sinks/sink.cpp index b7040c07..8ecead60 100644 --- a/src/sinks/sink.cpp +++ b/src/sinks/sink.cpp @@ -12,5 +12,5 @@ bool spdlog::sinks::sink::should_log(spdlog::level msg_level) const { void spdlog::sinks::sink::set_level(level level) { level_.store(level, std::memory_order_relaxed); } spdlog::level spdlog::sinks::sink::log_level() const { - return static_cast(level_.load(std::memory_order_relaxed)); + return level_.load(std::memory_order_relaxed); }