From bcc24961a080a4f8b660db1ca13882917697abb3 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 16 Sep 2023 00:37:16 +0300 Subject: [PATCH] Added forgotten inline keywords --- include/spdlog/spdlog.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index 8d12b687..66c99092 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -144,117 +144,117 @@ inline void log(level::level_enum lvl, format_string_t fmt, Args &&...a } template, typename... Args> -void log(source_loc loc, level::level_enum lvl, S fmt, Args &&...args) +inline void log(source_loc loc, level::level_enum lvl, S fmt, Args &&...args) { default_logger_raw()->log(loc, lvl, fmt, std::forward(args)...); } template, typename... Args> -void log(level::level_enum lvl, S fmt, Args &&...args) +inline void log(level::level_enum lvl, S fmt, Args &&...args) { default_logger_raw()->log(lvl, fmt, std::forward(args)...); } #ifdef SPDLOG_USE_SOURCE_LOCATION template -void trace(loc_with_fmt fmt, Args &&...args) +inline void trace(loc_with_fmt fmt, Args &&...args) { log(fmt.loc, level::trace, fmt.fmt_string, std::forward(args)...); } template -void debug(loc_with_fmt fmt, Args &&...args) +inline void debug(loc_with_fmt fmt, Args &&...args) { log(fmt.loc, level::debug, fmt.fmt_string, std::forward(args)...); } template -void info(loc_with_fmt fmt, Args &&...args) +inline void info(loc_with_fmt fmt, Args &&...args) { log(fmt.loc, level::info, fmt.fmt_string, std::forward(args)...); } template -void warn(loc_with_fmt fmt, Args &&...args) +inline void warn(loc_with_fmt fmt, Args &&...args) { log(fmt.loc, level::warn, fmt.fmt_string, std::forward(args)...); } template -void error(loc_with_fmt fmt, Args &&...args) +inline void error(loc_with_fmt fmt, Args &&...args) { log(fmt.loc, level::err, fmt.fmt_string, std::forward(args)...); } template -void critical(loc_with_fmt fmt, Args &&...args) +inline void critical(loc_with_fmt fmt, Args &&...args) { log(fmt.loc, level::critical, fmt.fmt_string, std::forward(args)...); } // log functions with no format string, just string -void trace(string_view_t msg, source_loc loc = source_loc::current()) +inline void trace(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::trace, msg); } -void debug(string_view_t msg, source_loc loc = source_loc::current()) +inline void debug(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::debug, msg); } -void info(string_view_t msg, source_loc loc = source_loc::current()) +inline void info(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::info, msg); } -void warn(string_view_t msg, source_loc loc = source_loc::current()) +inline void warn(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::warn, msg); } -void error(string_view_t msg, source_loc loc = source_loc::current()) +inline void error(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::err, msg); } -void critical(string_view_t msg, source_loc loc = source_loc::current()) +inline void critical(string_view_t msg, source_loc loc = source_loc::current()) { log(loc, level::critical, msg); } #else template -void trace(format_string_t fmt, Args &&...args) +inline void trace(format_string_t fmt, Args &&...args) { log(level::trace, fmt, std::forward(args)...); } template -void debug(format_string_t fmt, Args &&...args) +inline void debug(format_string_t fmt, Args &&...args) { log(level::debug, fmt, std::forward(args)...); } template -void info(format_string_t fmt, Args &&...args) +inline void info(format_string_t fmt, Args &&...args) { log(level::info, fmt, std::forward(args)...); } template -void warn(format_string_t fmt, Args &&...args) +inline void warn(format_string_t fmt, Args &&...args) { log(level::warn, fmt, std::forward(args)...); } template -void error(format_string_t fmt, Args &&...args) +inline void error(format_string_t fmt, Args &&...args) { log(level::err, fmt, std::forward(args)...); } template -void critical(format_string_t fmt, Args &&...args) +inline void critical(format_string_t fmt, Args &&...args) { log(level::critical, fmt, std::forward(args)...); }