mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-23 22:22:05 +08:00
Replace fmt::detail::vformat_to(buf,..) with fmt::vformat_to(fmt::appender(buf)
This commit is contained in:
parent
130ff0c8db
commit
c627c66560
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user