!16 删除冗余的判断语句

Merge pull request !16 from JokerXD_liu/refbase
This commit is contained in:
openharmony_ci
2021-09-23 01:49:16 +00:00
committed by Gitee
+2 -6
View File
@@ -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;
}