From b745cc966998c5920deeac9c285a27ca0f8ef4a8 Mon Sep 17 00:00:00 2001 From: Odysseas Georgoudis Date: Sun, 29 Dec 2024 15:09:15 +0000 Subject: [PATCH] remove some unused includes --- include/quill/Backend.h | 1 - include/quill/CsvWriter.h | 2 -- include/quill/Frontend.h | 1 - include/quill/backend/BackendManager.h | 2 +- include/quill/backend/SignalHandler.h | 8 ++++---- include/quill/backend/TimestampFormatter.h | 2 +- include/quill/backend/TransitEvent.h | 2 +- include/quill/backend/TransitEventBuffer.h | 4 ---- include/quill/backend/Utf8Conv.h | 4 ++-- include/quill/core/InlinedVector.h | 2 -- include/quill/core/MacroMetadata.h | 1 - include/quill/core/PatternFormatterOptions.h | 2 +- include/quill/core/UnboundedSPSCQueue.h | 2 -- include/quill/sinks/ConsoleSink.h | 1 - 14 files changed, 10 insertions(+), 24 deletions(-) diff --git a/include/quill/Backend.h b/include/quill/Backend.h index 4812e6f8..77059bc0 100644 --- a/include/quill/Backend.h +++ b/include/quill/Backend.h @@ -16,7 +16,6 @@ #include #include #include -#include #include QUILL_BEGIN_NAMESPACE diff --git a/include/quill/CsvWriter.h b/include/quill/CsvWriter.h index 48d2775c..b3ddac36 100644 --- a/include/quill/CsvWriter.h +++ b/include/quill/CsvWriter.h @@ -7,11 +7,9 @@ #include "quill/Frontend.h" #include "quill/core/Attributes.h" -#include "quill/core/LoggerBase.h" #include "quill/sinks/FileSink.h" #include "quill/sinks/Sink.h" -#include #include #include #include diff --git a/include/quill/Frontend.h b/include/quill/Frontend.h index a4e2054b..166e957d 100644 --- a/include/quill/Frontend.h +++ b/include/quill/Frontend.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/include/quill/backend/BackendManager.h b/include/quill/backend/BackendManager.h index b31818ff..24506729 100644 --- a/include/quill/backend/BackendManager.h +++ b/include/quill/backend/BackendManager.h @@ -25,7 +25,7 @@ namespace detail /** * Provides access to common collection class that are used by both the frontend and the backend * components of the logging system - * There should only be only active active instance of this class which is achieved by the + * There should only be only active instance of this class which is achieved by the * LogSystemManagerSingleton */ class BackendManager diff --git a/include/quill/backend/SignalHandler.h b/include/quill/backend/SignalHandler.h index 42d66ef8..348f1291 100644 --- a/include/quill/backend/SignalHandler.h +++ b/include/quill/backend/SignalHandler.h @@ -89,19 +89,19 @@ class SignalHandlerContext } /***/ - QUILL_NODISCARD LoggerBase* get_logger() noexcept + QUILL_NODISCARD static LoggerBase* get_logger() noexcept { LoggerBase* logger_base{nullptr}; - if (!SignalHandlerContext::instance().logger_name.empty()) + if (!instance().logger_name.empty()) { - logger_base = detail::LoggerManager::instance().get_logger(SignalHandlerContext::instance().logger_name); + logger_base = LoggerManager::instance().get_logger(instance().logger_name); } // This also checks if the logger was found above if (!logger_base || !logger_base->is_valid_logger()) { - logger_base = detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); + logger_base = LoggerManager::instance().get_valid_logger(excluded_logger_name_substr); } return logger_base; diff --git a/include/quill/backend/TimestampFormatter.h b/include/quill/backend/TimestampFormatter.h index e49e6f02..fb11a55c 100644 --- a/include/quill/backend/TimestampFormatter.h +++ b/include/quill/backend/TimestampFormatter.h @@ -34,7 +34,7 @@ namespace detail * 2) %Qus - Microseconds * 3) %Qns - Nanoseconds * @note %Qms, %Qus, %Qns specifiers are mutually exclusive - * e.g given : "%I:%M.%Qms%p" the output would be "03:21.343PM" + * e.g. given : "%I:%M.%Qms%p" the output would be "03:21.343PM" */ class TimestampFormatter { diff --git a/include/quill/backend/TransitEvent.h b/include/quill/backend/TransitEvent.h index f66b3d58..25b768dd 100644 --- a/include/quill/backend/TransitEvent.h +++ b/include/quill/backend/TransitEvent.h @@ -87,7 +87,7 @@ struct TransitEvent uint64_t timestamp{0}; MacroMetadata const* macro_metadata{nullptr}; - detail::LoggerBase* logger_base{nullptr}; + LoggerBase* logger_base{nullptr}; std::unique_ptr formatted_msg{std::make_unique()}; /** buffer for message **/ std::unique_ptr>> named_args; /** A unique ptr to save space as named args feature is not always used */ std::atomic* flush_flag{nullptr}; /** This is only used in the case of Event::Flush **/ diff --git a/include/quill/backend/TransitEventBuffer.h b/include/quill/backend/TransitEventBuffer.h index c86ef38f..be1987d1 100644 --- a/include/quill/backend/TransitEventBuffer.h +++ b/include/quill/backend/TransitEventBuffer.h @@ -11,10 +11,6 @@ #include "quill/core/Attributes.h" #include "quill/core/MathUtilities.h" -#include -#include -#include - QUILL_BEGIN_NAMESPACE namespace detail diff --git a/include/quill/backend/Utf8Conv.h b/include/quill/backend/Utf8Conv.h index a9d73e56..4d73bc03 100644 --- a/include/quill/backend/Utf8Conv.h +++ b/include/quill/backend/Utf8Conv.h @@ -31,8 +31,8 @@ namespace detail /** * @brief Convert a wide Unicode string to a UTF-8 encoded string. * - * @param input_string_data Pointer to the wide string data. - * @param input_string_length Length of the wide string. + * @param data Pointer to the wide string data. + * @param wide_str_len Length of the wide string. * @return The UTF-8 encoded string. * * @remarks If the input string is empty or the conversion fails, an empty string is returned. diff --git a/include/quill/core/InlinedVector.h b/include/quill/core/InlinedVector.h index dacca17c..4299afba 100644 --- a/include/quill/core/InlinedVector.h +++ b/include/quill/core/InlinedVector.h @@ -6,10 +6,8 @@ #pragma once -#include #include #include -#include #include #include "quill/core/Attributes.h" diff --git a/include/quill/core/MacroMetadata.h b/include/quill/core/MacroMetadata.h index bc3faef5..a16c36ee 100644 --- a/include/quill/core/MacroMetadata.h +++ b/include/quill/core/MacroMetadata.h @@ -10,7 +10,6 @@ #include "quill/core/Common.h" #include "quill/core/LogLevel.h" -#include #include #include #include diff --git a/include/quill/core/PatternFormatterOptions.h b/include/quill/core/PatternFormatterOptions.h index 122e0562..88b54bda 100644 --- a/include/quill/core/PatternFormatterOptions.h +++ b/include/quill/core/PatternFormatterOptions.h @@ -8,7 +8,7 @@ #include "quill/core/Attributes.h" #include "quill/core/Common.h" -#include + #include QUILL_BEGIN_NAMESPACE diff --git a/include/quill/core/UnboundedSPSCQueue.h b/include/quill/core/UnboundedSPSCQueue.h index deb2ded3..d8501f2f 100644 --- a/include/quill/core/UnboundedSPSCQueue.h +++ b/include/quill/core/UnboundedSPSCQueue.h @@ -9,13 +9,11 @@ #include "quill/core/Attributes.h" #include "quill/core/BoundedSPSCQueue.h" #include "quill/core/Common.h" -#include "quill/core/MathUtilities.h" #include "quill/core/QuillError.h" #include #include #include -#include #include QUILL_BEGIN_NAMESPACE diff --git a/include/quill/sinks/ConsoleSink.h b/include/quill/sinks/ConsoleSink.h index 0d6e9686..433e63d9 100644 --- a/include/quill/sinks/ConsoleSink.h +++ b/include/quill/sinks/ConsoleSink.h @@ -8,7 +8,6 @@ #include "quill/core/Attributes.h" #include "quill/core/LogLevel.h" -#include "quill/core/QuillError.h" #include "quill/sinks/StreamSink.h" #include