summaryrefslogtreecommitdiff
path: root/ec2n.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-07-30 13:24:37 -0400
committerJeffrey Walton <noloader@gmail.com>2015-07-30 13:24:37 -0400
commit8293570bd454d978ae0653826655a4aa559e352e (patch)
tree268823741a0e1fc80017cc66fff4057881299838 /ec2n.cpp
parent77206baf56e6feb111f54678038307ac216128d5 (diff)
downloadcryptopp-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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ec2n.cpp b/ec2n.cpp
index f54cb087..01c7e3fc 100644
--- a/ec2n.cpp
+++ b/ec2n.cpp
@@ -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;
}