diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-12 10:07:50 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-13 08:09:03 +0000 |
commit | 96fab0513215cc416e96e1b2089466afd0d2791c (patch) | |
tree | 7c03bd56b0c3744f0560c05ebb2f422155e64543 /xmlsecurity | |
parent | b3d5da663ff09c72455a8d3bf9be7c00220271bb (diff) |
clang-tidy modernize-loop-convert in writerfilter to xmlsecurity
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3
Reviewed-on: https://gerrit.libreoffice.org/24923
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/xsecsign.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/secerror.cxx | 7 |
2 files changed, 6 insertions, 9 deletions
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index ea88c0e27547..795c990aed3d 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -50,9 +50,9 @@ OUString XSecController::createId() char str[68]="ID_"; int length = 3; - for (int i=0; i<16; ++i) + for (sal_uInt8 i : aSeq) { - length += sprintf(str+length, "%04x", aSeq[i]); + length += sprintf(str+length, "%04x", i); } return OUString::createFromAscii(str); @@ -393,10 +393,8 @@ bool XSecController::WriteOOXMLSignature(const uno::Reference<embed::XStorage>& // Export the signature template. cssu::Reference<xml::sax::XDocumentHandler> xSEKHandler(m_xSAXEventKeeper, uno::UNO_QUERY); - for (size_t i = 0; i < m_vInternalSignatureInformations.size(); ++i) + for (InternalSignatureInformation & rInformation : m_vInternalSignatureInformations) { - InternalSignatureInformation& rInformation = m_vInternalSignatureInformations[i]; - // Prepare the signature creator. rInformation.xReferenceResolvedListener = prepareSignatureToWrite(rInformation, embed::StorageFormats::OFOPXML); diff --git a/xmlsecurity/source/xmlsec/nss/secerror.cxx b/xmlsecurity/source/xmlsec/nss/secerror.cxx index 4448599c10eb..ccc2e99338d5 100644 --- a/xmlsecurity/source/xmlsec/nss/secerror.cxx +++ b/xmlsecurity/source/xmlsec/nss/secerror.cxx @@ -48,11 +48,10 @@ const char * getCertError(PRErrorCode errNum) { static const char sEmpty[] = ""; - const int numDesc = SAL_N_ELEMENTS(allDesc); - for (int i = 0; i < numDesc; i++) + for (const ErrDesc& i : allDesc) { - if (allDesc[i].errNum == errNum) - return allDesc[i].errString; + if (i.errNum == errNum) + return i.errString; } return sEmpty; |