aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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