diff options
author | Wei Dai <weidai@weidai.com> | 2015-06-03 16:57:30 -0700 |
---|---|---|
committer | Wei Dai <weidai@weidai.com> | 2015-06-03 16:57:30 -0700 |
commit | e0959c5293804927de558a4874e87c01946c118b (patch) | |
tree | 040dfe9cc2c30b70a4ad1f4a3433faf8628f71de /asn.cpp | |
parent | 789f81f048c9bc472c7e7596f49b02eadd6fc1fd (diff) | |
download | cryptopp-git-e0959c5293804927de558a4874e87c01946c118b.tar.gz |
small optimization
no need to use resize here, which copies old content
Diffstat (limited to 'asn.cpp')
-rw-r--r-- | asn.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -123,7 +123,7 @@ size_t BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str) if (!BERLengthDecode(bt, bc)) BERDecodeError(); - str.resize(bc); + str.New(bc); if (bc != bt.Get(str, bc)) BERDecodeError(); return bc; |