From 5882bfd0ad0f4cd9dfabc5c39942bd1661d218b0 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 Sep 2023 22:28:01 +0300 Subject: [PATCH] Simplify by replacing is_convertible_to_sv with string_view_t param --- include/spdlog/spdlog.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index 074751a5..790652c5 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -193,38 +193,32 @@ void critical(loc_with_fmt fmt, Args &&...args) } // log functions with no format string, just string -template> -void trace(const S msg, source_loc loc = source_loc::current()) +void trace(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::trace, msg); } -template> -void debug(const S msg, source_loc loc = source_loc::current()) +void debug(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::debug, msg); } -template> -void info(const S msg, source_loc loc = source_loc::current()) +void info(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::info, msg); } -template> -void warn(const S msg, source_loc loc = source_loc::current()) +void warn(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::warn, msg); } -template> -void error(const S msg, source_loc loc = source_loc::current()) +void error(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::err, msg); } -template> -void critical(const S msg, source_loc loc = source_loc::current()) +void critical(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::critical, msg); }