diff options
author | gabime <gmelman1@gmail.comx> | 2022-05-08 13:01:45 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.comx> | 2022-05-08 13:01:45 +0300 |
commit | 128cbe5a06051e0bc43d90c2434f7f68a2900587 (patch) | |
tree | 4e14642824afada597803888f2f0a7f2373d566d /include/spdlog | |
parent | 6d587f51811e2a68680707540d7b617a62da8bc9 (diff) |
clang-format
Diffstat (limited to 'include/spdlog')
-rw-r--r-- | include/spdlog/common.h | 2 | ||||
-rw-r--r-- | 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<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)...)); 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>(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); |