From 6a53d6354b7d356a26eee9eea9e50038b92cd8f6 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 28 Jul 2023 18:42:11 +0300 Subject: [PATCH] minor cleanup --- include/spdlog/logger.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index c137842f..58f85878 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -79,7 +79,7 @@ public: template void log(source_loc loc, level::level_enum lvl, format_string_t fmt, Args &&...args) { - log_(loc, lvl, details::to_string_view(fmt), std::forward(args)...); + log_with_format_(loc, lvl, details::to_string_view(fmt), std::forward(args)...); } template @@ -242,12 +242,11 @@ protected: spdlog::level_t flush_level_{level::off}; err_handler custom_err_handler_{nullptr}; - // common implementation for after templated public api has been resolved + // common implementation for after templated public api has been resolved to format string and args template - void log_(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args) + void log_with_format_(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args) { - bool log_enabled = should_log(lvl); - if (!log_enabled) + if (!should_log(lvl)) { return; }