Use better iteration

This commit is contained in:
joshaber 2017-04-03 15:28:51 -04:00
parent 06643e525a
commit b0ef7ddf44

View file

@ -71,8 +71,7 @@ v8::Local<v8::Value> Converter<scoped_refptr<net::X509Certificate>>::ToV8(
dict.Set("issuerCert", issuer_cert); dict.Set("issuerCert", issuer_cert);
std::vector<std::string> intermediates_encoded; std::vector<std::string> intermediates_encoded;
for (size_t i = 0; i < intermediates.size(); i++) { for (auto& native_cert : intermediates) {
auto native_cert = intermediates[i];
std::string encoded; std::string encoded;
net::X509Certificate::GetPEMEncoded(native_cert, &encoded); net::X509Certificate::GetPEMEncoded(native_cert, &encoded);
intermediates_encoded.push_back(encoded); intermediates_encoded.push_back(encoded);