aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-12-25 22:53:08 +0000
committerlloyd <[email protected]>2013-12-25 22:53:08 +0000
commita558fbfb082e1ee9ab77af46ea1d85049dda7028 (patch)
tree594b0e4089ac5662acf25e80db97f1f634c54c7d /src
parent818887511b72bdaea4852997394bd85bf1dfe1fb (diff)
Use a const reference return
Diffstat (limited to 'src')
-rw-r--r--src/asn1/asn1_oid.cpp4
-rw-r--r--src/asn1/asn1_oid.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/asn1/asn1_oid.cpp b/src/asn1/asn1_oid.cpp
index bbbfd822b..964315080 100644
--- a/src/asn1/asn1_oid.cpp
+++ b/src/asn1/asn1_oid.cpp
@@ -104,8 +104,8 @@ bool operator!=(const OID& a, const OID& b)
*/
bool operator<(const OID& a, const OID& b)
{
- std::vector<u32bit> oid1 = a.get_id();
- std::vector<u32bit> oid2 = b.get_id();
+ const std::vector<u32bit>& oid1 = a.get_id();
+ const std::vector<u32bit>& oid2 = b.get_id();
if(oid1.size() < oid2.size())
return true;
diff --git a/src/asn1/asn1_oid.h b/src/asn1/asn1_oid.h
index 78594265d..a0b1edeba 100644
--- a/src/asn1/asn1_oid.h
+++ b/src/asn1/asn1_oid.h
@@ -33,7 +33,7 @@ class BOTAN_DLL OID : public ASN1_Object
* Get this OID as list (vector) of its components.
* @return vector representing this OID
*/
- std::vector<u32bit> get_id() const { return id; }
+ const std::vector<u32bit>& get_id() const { return id; }
/**
* Get this OID as a string