Fixed analyzer warnings

This commit is contained in:
gabime 2024-12-07 18:39:12 +02:00
parent cb939ce9b8
commit 5ec87952ff
2 changed files with 5 additions and 5 deletions

View File

@ -170,17 +170,17 @@ public:
// create new logger with same sinks and configuration. // create new logger with same sinks and configuration.
virtual std::shared_ptr<logger> clone(std::string logger_name); virtual std::shared_ptr<logger> clone(std::string logger_name);
protected: private:
std::string name_; std::string name_;
std::vector<sink_ptr> sinks_; std::vector<sink_ptr> sinks_;
spdlog::atomic_level_t level_{level::info}; atomic_level_t level_{level::info};
spdlog::atomic_level_t flush_level_{level::off}; atomic_level_t flush_level_{level::off};
err_handler custom_err_handler_{nullptr}; err_handler custom_err_handler_{nullptr};
// common implementation for after templated public api has been resolved to format string and // common implementation for after templated public api has been resolved to format string and
// args // args
template <typename... Args> template <typename... Args>
void log_with_format_(source_loc loc, const level lvl, const format_string_t<Args...> &format_string, Args &&...args) { void log_with_format_(source_loc loc, const level lvl, const format_string_t<Args...> &format_string, const Args &...args) {
assert(should_log(lvl)); assert(should_log(lvl));
try { try {
memory_buf_t buf; memory_buf_t buf;

View File

@ -43,7 +43,7 @@ async_log_msg &async_log_msg::operator=(const async_log_msg &other) {
} }
async_log_msg &async_log_msg::operator=(async_log_msg &&other) noexcept { async_log_msg &async_log_msg::operator=(async_log_msg &&other) noexcept {
log_msg::operator=(std::forward<async_log_msg&&>(other)); log_msg::operator=(std::forward<async_log_msg>(other));
msg_type_ = other.msg_type_; msg_type_ = other.msg_type_;
buffer_ = std::move(other.buffer_); buffer_ = std::move(other.buffer_);
update_string_views(); update_string_views();