[esnacc-dev] [PATCH] cxx-lib/asn-buf: fix a large parameter pass-by-value
Aaron Conole
aconole at bytheb.org
Mon Jan 15 20:42:33 UTC 2018
The BufferException object is quite large (>512 bytes), which incurrs
a performance impact. Convert the pass-by-value to a
pass-by-reference.
Fixes: ea172d558054 ("cxx-lib/src/asn-buf: make GetSeg non-throwing.")
Signed-off-by: Aaron Conole <aconole at bytheb.org>
---
cxx-lib/src/asn-buf.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cxx-lib/src/asn-buf.cpp b/cxx-lib/src/asn-buf.cpp
index c599182..2591bec 100644
--- a/cxx-lib/src/asn-buf.cpp
+++ b/cxx-lib/src/asn-buf.cpp
@@ -208,7 +208,7 @@ char * AsnBuf::GetSeg(long segLen) const
try {
GetSeg(seg, segLen);
- } catch (BufferException) {
+ } catch (BufferException &) {
delete [] seg;
seg = NULL;
}
--
2.14.3
More information about the dev
mailing list