Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgabime <gmelman1@gmail.comx>2022-10-31 19:26:07 +0300
committergabime <gmelman1@gmail.comx>2022-10-31 19:26:07 +0300
commitc627c665603232e5c53bf97e4db7592ec67decf7 (patch)
tree571290cc001bc18d56dcd78c021631e59933cfeb
parent130ff0c8db07824853fac15e634003da598680f0 (diff)
Replace fmt::detail::vformat_to(buf,..) with fmt::vformat_to(fmt::appender(buf)
-rw-r--r--include/spdlog/logger.h3
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()));