Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1895)

Unified Diff: crypto/rsa_private_key_nss.cc

Issue 8533028: RSAPrivateKey vector push_back cleanups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/rsa_private_key.cc ('k') | crypto/rsa_private_key_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key_nss.cc
diff --git a/crypto/rsa_private_key_nss.cc b/crypto/rsa_private_key_nss.cc
index 0d79dbe84661831740ef43cdd66bf72696f26685..cd1f9203f3517b1cbe4451ab9700803d52c055fd 100644
--- a/crypto/rsa_private_key_nss.cc
+++ b/crypto/rsa_private_key_nss.cc
@@ -168,9 +168,7 @@ bool RSAPrivateKey::ExportPublicKey(std::vector<uint8>* output) {
return false;
}
- for (size_t i = 0; i < der_pubkey->len; ++i)
- output->push_back(der_pubkey->data[i]);
-
+ output->assign(der_pubkey->data, der_pubkey->data + der_pubkey->len);
return true;
}
« no previous file with comments | « crypto/rsa_private_key.cc ('k') | crypto/rsa_private_key_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698