aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/ec_gfp/point_gfp.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-06-13 18:07:19 +0000
committerlloyd <[email protected]>2011-06-13 18:07:19 +0000
commit6aac9723c9c286b5486e970e496daf7d01d83f4b (patch)
tree634b4dce3b001433e12dceec16ce7844b56140d0 /src/math/ec_gfp/point_gfp.h
parent083392226592438a2ac82c6e0aeaddc5a6074c26 (diff)
Inline BigInt move operators and swap
Add move constructor and assignment to PointGFp
Diffstat (limited to 'src/math/ec_gfp/point_gfp.h')
-rw-r--r--src/math/ec_gfp/point_gfp.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/math/ec_gfp/point_gfp.h b/src/math/ec_gfp/point_gfp.h
index b2b6fe2f0..546a8dd6f 100644
--- a/src/math/ec_gfp/point_gfp.h
+++ b/src/math/ec_gfp/point_gfp.h
@@ -59,6 +59,34 @@ class BOTAN_DLL PointGFp
PointGFp(const CurveGFp& curve);
/**
+ * Copy constructor
+ */
+ PointGFp(const PointGFp&) = default;
+
+ /**
+ * Move Constructor
+ */
+ PointGFp(PointGFp&& other)
+ {
+ this->swap(other);
+ }
+
+ /**
+ * Standard Assignment
+ */
+ PointGFp& operator=(const PointGFp&) = default;
+
+ /**
+ * Move Assignment
+ */
+ PointGFp& operator=(PointGFp&& other)
+ {
+ if(this != &other)
+ this->swap(other);
+ return (*this);
+ }
+
+ /**
* Construct a point from its affine coordinates
* @param curve the base curve
* @param x affine x coordinate
@@ -66,9 +94,6 @@ class BOTAN_DLL PointGFp
*/
PointGFp(const CurveGFp& curve, const BigInt& x, const BigInt& y);
- //PointGFp(const PointGFp& other) = default;
- //PointGFp& operator=(const PointGFp& other) = default;
-
/**
* += Operator
* @param rhs the PointGFp to add to the local value