mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-09 19:56:46 +00:00
chore: Enable clang-tidy bugprone-unhandled-self-assignment check (#6504)
This commit is contained in:
@@ -64,6 +64,7 @@ Checks: "-*,
|
||||
bugprone-undefined-memory-manipulation,
|
||||
bugprone-undelegated-constructor,
|
||||
bugprone-unhandled-exception-at-new,
|
||||
bugprone-unhandled-self-assignment,
|
||||
bugprone-unique-ptr-array-mismatch,
|
||||
bugprone-unsafe-functions,
|
||||
bugprone-unused-local-non-trivial-variable,
|
||||
@@ -100,7 +101,6 @@ Checks: "-*,
|
||||
# bugprone-switch-missing-default-case,
|
||||
# bugprone-unused-return-value,
|
||||
# bugprone-use-after-move,
|
||||
# bugprone-unhandled-self-assignment,
|
||||
# bugprone-unused-raii,
|
||||
#
|
||||
# cppcoreguidelines-misleading-capture-default-by-value,
|
||||
|
||||
@@ -23,6 +23,9 @@ STBase::STBase(SField const& n) : fName(&n)
|
||||
STBase&
|
||||
STBase::operator=(STBase const& t)
|
||||
{
|
||||
if (this == &t)
|
||||
return *this;
|
||||
|
||||
if (!fName->isUseful())
|
||||
fName = t.fName;
|
||||
return *this;
|
||||
|
||||
@@ -39,6 +39,9 @@ Consumer::~Consumer()
|
||||
Consumer&
|
||||
Consumer::operator=(Consumer const& other)
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
|
||||
// remove old ref
|
||||
if (m_logic && m_entry)
|
||||
m_logic->release(*m_entry);
|
||||
|
||||
Reference in New Issue
Block a user