aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-12 05:47:23 +0000
committerlloyd <[email protected]>2008-10-12 05:47:23 +0000
commit9060e341de5c3b8c98c0250dac2211d15e1cd252 (patch)
tree07b9b3b9635ffa6f6de2327908bc1e760d5fd598 /src/math
parentb90900b6dc19d709b71e87b9afc02b5877896d5c (diff)
Modify CurveGFp::get_{a,b} to return a const reference instead of a copy
Diffstat (limited to 'src/math')
-rw-r--r--src/math/gfpmath/curve_gfp.cpp6
-rw-r--r--src/math/gfpmath/curve_gfp.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/math/gfpmath/curve_gfp.cpp b/src/math/gfpmath/curve_gfp.cpp
index 8b1ccbf94..4b32e7095 100644
--- a/src/math/gfpmath/curve_gfp.cpp
+++ b/src/math/gfpmath/curve_gfp.cpp
@@ -91,17 +91,17 @@ const CurveGFp& CurveGFp::operator=(const CurveGFp& other)
}
// getters
-GFpElement const CurveGFp::get_a() const
+const GFpElement& CurveGFp::get_a() const
{
return mA;
}
-GFpElement const CurveGFp::get_b() const
+const GFpElement& CurveGFp::get_b() const
{
return mB;
}
-BigInt const CurveGFp::get_p() const
+const BigInt CurveGFp::get_p() const
{
assert(mp_mod.get() != 0);
return mp_mod->get_p();
diff --git a/src/math/gfpmath/curve_gfp.h b/src/math/gfpmath/curve_gfp.h
index b996aa3b1..dd785c749 100644
--- a/src/math/gfpmath/curve_gfp.h
+++ b/src/math/gfpmath/curve_gfp.h
@@ -63,13 +63,13 @@ class BOTAN_DLL CurveGFp
* Get coefficient a
* @result coefficient a
*/
- GFpElement const get_a() const;
+ const GFpElement& get_a() const;
/**
* Get coefficient b
* @result coefficient b
*/
- GFpElement const get_b() const;
+ const GFpElement& get_b() const;
/**
* Get the GFpElement coefficient a transformed