Commit 78af6ba8 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2726] Use more common check for assignment to self

This way cppcheck should recognize it as such.
parent a0b8bc36
......@@ -338,7 +338,7 @@ TSIG::TSIG(const TSIG& source) : Rdata(), impl_(new TSIGImpl(*source.impl_))
TSIG&
TSIG::operator=(const TSIG& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -62,7 +62,7 @@ DLV::DLV(const DLV& source) :
/// PIMPL-induced logic
DLV&
DLV::operator=(const DLV& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -212,7 +212,7 @@ DNSKEY::DNSKEY(const DNSKEY& source) :
DNSKEY&
DNSKEY::operator=(const DNSKEY& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -50,7 +50,7 @@ DS::DS(const DS& source) :
DS&
DS::operator=(const DS& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -200,7 +200,7 @@ NSEC3::NSEC3(const NSEC3& source) :
NSEC3&
NSEC3::operator=(const NSEC3& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -139,7 +139,7 @@ NSEC3PARAM::NSEC3PARAM(const NSEC3PARAM& source) :
NSEC3PARAM&
NSEC3PARAM::operator=(const NSEC3PARAM& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -155,7 +155,7 @@ NSEC::NSEC(const NSEC& source) :
NSEC&
NSEC::operator=(const NSEC& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -230,7 +230,7 @@ RRSIG::RRSIG(const RRSIG& source) :
RRSIG&
RRSIG::operator=(const RRSIG& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -42,7 +42,7 @@ using namespace isc::util;
/// This method never throws an exception otherwise.
SPF&
SPF::operator=(const SPF& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -199,7 +199,7 @@ SSHFP::SSHFP(const SSHFP& other) :
SSHFP&
SSHFP::operator=(const SSHFP& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -33,7 +33,7 @@ using namespace isc::util;
TXT&
TXT::operator=(const TXT& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -190,7 +190,7 @@ SRV::SRV(const SRV& source) :
SRV&
SRV::operator=(const SRV& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
......@@ -148,7 +148,7 @@ TSIGKey::TSIGKey(const TSIGKey& source) : impl_(new TSIGKeyImpl(*source.impl_))
TSIGKey&
TSIGKey::operator=(const TSIGKey& source) {
if (impl_ == source.impl_) {
if (this == &source) {
return (*this);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment