From 128cbe5a06051e0bc43d90c2434f7f68a2900587 Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 8 May 2022 13:01:45 +0300 Subject: [PATCH] clang-format --- include/spdlog/common.h | 2 +- include/spdlog/logger.h | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 443c058a..9ab886f5 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -324,7 +324,7 @@ template using enable_if_t = typename std::enable_if::type; template -std::unique_ptr make_unique(Args &&...args) +std::unique_ptr make_unique(Args &&... args) { static_assert(!std::is_array::value, "arrays not supported"); return std::unique_ptr(new T(std::forward(args)...)); diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 7abfb0d8..b97994db 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -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)...)); #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)...)); #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(std::forward(args)...)); -#else +# ifdef SPDLOG_USE_STD_FORMAT + fmt_lib::vformat_to( + std::back_inserter(wbuf), fmt, fmt_lib::make_format_args(std::forward(args)...)); +# else fmt::detail::vformat_to(wbuf, fmt, fmt::make_format_args(std::forward(args)...)); -#endif +# endif memory_buf_t buf; details::os::wstr_to_utf8buf(wstring_view_t(wbuf.data(), wbuf.size()), buf);