From 63507e5de61feae49567d5e97884281dc5223d0d Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 7 Dec 2024 18:49:08 +0200 Subject: [PATCH] Fixed analyzer warnings --- src/details/async_log_msg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/details/async_log_msg.cpp b/src/details/async_log_msg.cpp index 2d22a212..62c95cab 100644 --- a/src/details/async_log_msg.cpp +++ b/src/details/async_log_msg.cpp @@ -34,6 +34,7 @@ async_log_msg::async_log_msg(async_log_msg &&other) noexcept } async_log_msg &async_log_msg::operator=(const async_log_msg &other) { + if (this == &other) return *this; log_msg::operator=(other); msg_type_ = other.msg_type_; buffer_.clear(); @@ -43,6 +44,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 { + if (this == &other) return *this; log_msg::operator=(other); msg_type_ = other.msg_type_; buffer_ = std::move(other.buffer_);