From bff85725d216584e5b4263dab52aaa4d30a60e6b Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 8 Nov 2019 16:20:41 +0200 Subject: [PATCH] Fixed some more clang-tidy warnings --- include/spdlog/details/log_msg_buffer-inl.h | 4 ++-- include/spdlog/details/log_msg_buffer.h | 2 +- include/spdlog/details/pattern_formatter-inl.h | 2 +- include/spdlog/logger-inl.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/spdlog/details/log_msg_buffer-inl.h b/include/spdlog/details/log_msg_buffer-inl.h index 704cd9fa..0c1d9f35 100644 --- a/include/spdlog/details/log_msg_buffer-inl.h +++ b/include/spdlog/details/log_msg_buffer-inl.h @@ -42,9 +42,9 @@ SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(const log_msg_buffer &ot return *this; } -SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(log_msg_buffer &&other) +SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT { - log_msg::operator=(std::move(other)); + log_msg::operator=(other); buffer = std::move(other.buffer); update_string_views(); return *this; diff --git a/include/spdlog/details/log_msg_buffer.h b/include/spdlog/details/log_msg_buffer.h index 1a204e22..c20ae7b0 100644 --- a/include/spdlog/details/log_msg_buffer.h +++ b/include/spdlog/details/log_msg_buffer.h @@ -22,7 +22,7 @@ public: log_msg_buffer(const log_msg_buffer &other); log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; log_msg_buffer &operator=(const log_msg_buffer &other); - log_msg_buffer &operator=(log_msg_buffer &&other); + log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; }; } // namespace details diff --git a/include/spdlog/details/pattern_formatter-inl.h b/include/spdlog/details/pattern_formatter-inl.h index 8eeea621..8bee8a51 100644 --- a/include/spdlog/details/pattern_formatter-inl.h +++ b/include/spdlog/details/pattern_formatter-inl.h @@ -876,7 +876,7 @@ public: fmt_helper::pad6(static_cast(delta_units.count()), dest); } -protected: +private: log_clock::time_point last_message_time_; }; diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 062304ba..95a485f1 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -150,7 +150,7 @@ SPDLOG_INLINE std::vector &logger::sinks() // error handler SPDLOG_INLINE void logger::set_error_handler(err_handler handler) { - custom_err_handler_ = handler; + custom_err_handler_ = std::move(handler); } // create new logger with same sinks and configuration.