From 1d9ec2373a7b7d7f6fb092dd66f2ca551a8083ef Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 25 Jun 2018 16:31:56 +0300 Subject: [PATCH] Better support for 32bits --- include/spdlog/details/pattern_formatter_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 61edaa97..2832f14b 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -372,7 +372,7 @@ class t_formatter SPDLOG_FINAL : public flag_formatter void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override { // fmt::format_to(dest, "{}", msg.thread_id); - fmt_helper::append_size_t(msg.thread_id, dest); + fmt_helper::append_int(msg.thread_id, dest); } }; @@ -527,8 +527,8 @@ class full_formatter SPDLOG_FINAL : public flag_formatter } private: - long cached_seconds_ts_{0}; - long cached_millis_ts_{0}; + std::chrono::seconds::rep cached_seconds_ts_{0}; + std::chrono::milliseconds::rep cached_millis_ts_{0}; fmt::memory_buffer cached_header_; fmt::memory_buffer cached_millis_; };