mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
clang-format
This commit is contained in:
parent
6d587f5181
commit
128cbe5a06
@ -324,7 +324,7 @@ template<bool B, class T = void>
|
||||
using enable_if_t = typename std::enable_if<B, T>::type;
|
||||
|
||||
template<typename T, typename... Args>
|
||||
std::unique_ptr<T> make_unique(Args &&...args)
|
||||
std::unique_ptr<T> make_unique(Args &&... args)
|
||||
{
|
||||
static_assert(!std::is_array<T>::value, "arrays not supported");
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
|
@ -367,7 +367,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),..)
|
||||
// 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)...));
|
||||
#endif
|
||||
|
||||
@ -391,11 +391,12 @@ protected:
|
||||
{
|
||||
// format to wmemory_buffer and convert to utf8
|
||||
wmemory_buf_t wbuf;
|
||||
#ifdef SPDLOG_USE_STD_FORMAT
|
||||
fmt_lib::vformat_to(std::back_inserter(wbuf), fmt, fmt_lib::make_format_args<fmt_lib::wformat_context>(std::forward<Args>(args)...));
|
||||
#else
|
||||
# ifdef SPDLOG_USE_STD_FORMAT
|
||||
fmt_lib::vformat_to(
|
||||
std::back_inserter(wbuf), fmt, fmt_lib::make_format_args<fmt_lib::wformat_context>(std::forward<Args>(args)...));
|
||||
# else
|
||||
fmt::detail::vformat_to(wbuf, fmt, fmt::make_format_args<fmt::wformat_context>(std::forward<Args>(args)...));
|
||||
#endif
|
||||
# endif
|
||||
|
||||
memory_buf_t buf;
|
||||
details::os::wstr_to_utf8buf(wstring_view_t(wbuf.data(), wbuf.size()), buf);
|
||||
|
Loading…
Reference in New Issue
Block a user