From 153be3b9678b65b22e47a5078a9acc1638963b89 Mon Sep 17 00:00:00 2001 From: paulc Date: Wed, 14 Aug 2013 08:38:40 +0000 Subject: [PATCH] Return string by reference instead of value from ASN.1 library. Improves performance of SNMP queries. git-svn-id: http://voip.null.ro/svn/yate@5623 acf43c95-373e-0410-b603-e72c3f656dc1 --- libs/yasn/yateasn.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/yasn/yateasn.h b/libs/yasn/yateasn.h index 08b32d50..f4648c23 100644 --- a/libs/yasn/yateasn.h +++ b/libs/yasn/yateasn.h @@ -201,8 +201,8 @@ public: * Get the value in the form of a string * @return String containing the internal data */ - inline String getValue() - { return m_data;} + inline const String& getValue() + { return m_data; } /** * Get the type of the data so that we know how to interpret it @@ -227,7 +227,7 @@ public: * Assign operator */ inline AsnValue& operator=( AsnValue val) - { + { m_data = val.getValue(); m_type = val.type(); return *this;