From 59f54cda10ea1ee30003ef46f08371e5ed6dccb4 Mon Sep 17 00:00:00 2001 From: gabime Date: Wed, 4 Jul 2018 10:44:05 +0300 Subject: [PATCH] Fixed msvc conversion warnings --- include/spdlog/details/fmt_helper.h | 9 ++------- include/spdlog/details/mpmc_blocking_q.h | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h index b55bfb9b..4c9ea14e 100644 --- a/include/spdlog/details/fmt_helper.h +++ b/include/spdlog/details/fmt_helper.h @@ -86,7 +86,7 @@ inline void pad3(int n, fmt::memory_buffer &dest) fmt::format_to(dest, "{:03}", n); } -inline void pad6(int n, fmt::memory_buffer &dest) +inline void pad6(size_t n, fmt::memory_buffer &dest) { if (n > 99999) { @@ -122,12 +122,7 @@ inline void pad6(int n, fmt::memory_buffer &dest) dest.push_back('0'); dest.push_back('0'); dest.push_back('0'); - } - else // negatives (unlikely, but just in case let fmt deal with it) - { - fmt::format_to(dest, "{:06}", n); - return; - } + } append_int(n, dest); } diff --git a/include/spdlog/details/mpmc_blocking_q.h b/include/spdlog/details/mpmc_blocking_q.h index f34297ef..b31a0854 100644 --- a/include/spdlog/details/mpmc_blocking_q.h +++ b/include/spdlog/details/mpmc_blocking_q.h @@ -59,7 +59,6 @@ public: { return false; } - q_.pop_front(popped_item); } pop_cv_.notify_one(); @@ -70,7 +69,6 @@ private: std::mutex queue_mutex_; std::condition_variable push_cv_; std::condition_variable pop_cv_; - spdlog::details::circular_q q_; }; } // namespace details