diff options
author | gabime <gmelman1@gmail.comx> | 2022-10-31 19:26:07 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.comx> | 2022-10-31 19:26:07 +0300 |
commit | c627c665603232e5c53bf97e4db7592ec67decf7 (patch) | |
tree | 571290cc001bc18d56dcd78c021631e59933cfeb /include/spdlog | |
parent | 130ff0c8db07824853fac15e634003da598680f0 (diff) |
Replace fmt::detail::vformat_to(buf,..) with fmt::vformat_to(fmt::appender(buf)
Diffstat (limited to 'include/spdlog')
-rw-r--r-- | include/spdlog/logger.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 068b5aa6..8f83e81b 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -371,8 +371,7 @@ protected: #ifdef SPDLOG_USE_STD_FORMAT fmt_lib::vformat_to(std::back_inserter(buf), fmt, fmt_lib::make_format_args(std::forward<Args>(args)...)); #else - // seems that fmt::detail::vformat_to(buf, ...) is ~20ns faster than fmt::vformat_to(std::back_inserter(buf),..) - fmt::detail::vformat_to(buf, fmt, fmt::make_format_args(std::forward<Args>(args)...)); + fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward<Args>(args)...)); #endif details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size())); |