diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-30 13:24:37 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-30 13:24:37 -0400 |
commit | 8293570bd454d978ae0653826655a4aa559e352e (patch) | |
tree | 268823741a0e1fc80017cc66fff4057881299838 /ec2n.cpp | |
parent | 77206baf56e6feb111f54678038307ac216128d5 (diff) | |
download | cryptopp-git-8293570bd454d978ae0653826655a4aa559e352e.tar.gz |
Added self-assignment guards or comment indicating why the check is not needed
Diffstat (limited to 'ec2n.cpp')
-rw-r--r-- | ec2n.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -237,9 +237,11 @@ const EC2N::Point& EC2N::Double(const Point &P) const /* EcPrecomputation<EC2N>& EcPrecomputation<EC2N>::operator=(const EcPrecomputation<EC2N> &rhs) { - m_ec = rhs.m_ec; - m_ep = rhs.m_ep; - m_ep.m_group = m_ec.get(); + if (this != &rhs) + { + DL_GroupPrecomputation::operator=(rhs); + m_ec = rhs.m_ec; + } return *this; } |