From 2484de6728bd11bb7949003d112f1ece2223c7a1 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 14 Oct 2021 09:25:24 +0200 Subject: Remove non-const Sequence::begin()/end() in internal code ... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann Reviewed-by: Mike Kaganski --- xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index 5f1e6a1286e7..db3ac9b3d663 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -124,7 +124,7 @@ bool PDFSigningTest::sign(const OUString& rInURL, const OUString& rOutURL, uno::Sequence> aCertificates = xSecurityEnvironment->getPersonalCertificates(); DateTime now(DateTime::SYSTEM); - for (auto& cert : aCertificates) + for (auto& cert : asNonConstRange(aCertificates)) { css::util::DateTime aNotValidAfter = cert->getNotValidAfter(); css::util::DateTime aNotValidBefore = cert->getNotValidBefore(); -- cgit