From 7a4deabdedfad7cd61bc1931e65a00ae7bbc2772 Mon Sep 17 00:00:00 2001 From: compiler Date: Wed, 22 Sep 2021 14:29:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujialiang --- base/src/refbase.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/base/src/refbase.cpp b/base/src/refbase.cpp index 63b4cb8..ab93653 100755 --- a/base/src/refbase.cpp +++ b/base/src/refbase.cpp @@ -276,9 +276,7 @@ RefBase &RefBase::operator=(const RefBase &/*other*/) RefBase::RefBase(RefBase &&other) noexcept { refs_ = other.refs_; - if (other.refs_ != nullptr) { - other.refs_ = nullptr; - } + other.refs_ = nullptr; } RefBase &RefBase::operator=(RefBase &&other) noexcept @@ -293,9 +291,7 @@ RefBase &RefBase::operator=(RefBase &&other) noexcept } refs_ = other.refs_; - if (other.refs_ != nullptr) { - other.refs_ = nullptr; - } + other.refs_ = nullptr; return *this; } -- Gitee