From fc3e2c8bba202a3ea3e92672f566d6ec16f18681 Mon Sep 17 00:00:00 2001 From: "U-AMANDAQUARESMA\\quare" Date: Thu, 23 May 2024 16:14:49 +0200 Subject: [PATCH] tdf#145538 Use range based for loops Change-Id: Ib672cd1968de7bb99cd5f8737a09ce02b0490bf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167995 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas --- .../xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index 3c3cf3254969..a6258f92ad76 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -722,11 +722,11 @@ static HCERTSTORE getCertStoreForIntermediatCerts( if (store == nullptr) return nullptr; - for (int i = 0; i < seqCerts.getLength(); i++) + for (const auto& i : seqCerts) { - SAL_INFO("xmlsecurity.xmlsec", "Added temporary certificate: " << seqCerts[i]->getSubjectName()); + SAL_INFO("xmlsecurity.xmlsec", "Added temporary certificate: " << i->getSubjectName()); - uno::Sequence data = seqCerts[i]->getEncoded(); + uno::Sequence data = i->getEncoded(); PCCERT_CONTEXT cert = CertCreateCertificateContext( X509_ASN_ENCODING, reinterpret_cast(&data[0]), data.getLength()); //Adding the certificate creates a copy and not just increases the ref count