From 433785dc64fd60276f3a029c84835555280b8411 Mon Sep 17 00:00:00 2001 From: gabime Date: Thu, 5 Sep 2019 01:12:27 +0300 Subject: [PATCH] fix warnings and build --- include/spdlog/details/backtracer.h | 2 +- include/spdlog/details/circular_q.h | 2 +- include/spdlog/details/log_msg_buffer.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/details/backtracer.h b/include/spdlog/details/backtracer.h index f675d03e..2dab7aff 100644 --- a/include/spdlog/details/backtracer.h +++ b/include/spdlog/details/backtracer.h @@ -63,7 +63,7 @@ namespace spdlog { return enabled_.load(std::memory_order_relaxed); } - operator bool() const + explicit operator bool() const { return enabled(); } diff --git a/include/spdlog/details/circular_q.h b/include/spdlog/details/circular_q.h index 77170eb7..d2eeb021 100644 --- a/include/spdlog/details/circular_q.h +++ b/include/spdlog/details/circular_q.h @@ -35,7 +35,7 @@ namespace spdlog { // move cannot be default, // since we need to reset head_, tail_, etc to zero in the moved object - circular_q(circular_q&& other) SPDLOG_NOEXCEPT: + circular_q(circular_q&& other) SPDLOG_NOEXCEPT { copy_moveable(std::move(other)); } diff --git a/include/spdlog/details/log_msg_buffer.h b/include/spdlog/details/log_msg_buffer.h index 9f77d5ce..e23f28e8 100644 --- a/include/spdlog/details/log_msg_buffer.h +++ b/include/spdlog/details/log_msg_buffer.h @@ -47,10 +47,10 @@ public: update_string_views(); } - log_msg_buffer &operator=(log_msg_buffer &other) + log_msg_buffer &operator=(const log_msg_buffer &other) { log_msg::operator=(other); - buffer.append(other.buffer.begin(), other.buffer.end()); + buffer.append(other.buffer.data(), other.buffer.data() + other.buffer.size()); update_string_views(); return *this; }