From 594554e07a952c1aaee9b96d4259bc8418b46ee9 Mon Sep 17 00:00:00 2001 From: Chris Gill Date: Thu, 17 Oct 2024 17:53:32 +0100 Subject: tdf#163738 use insert function instead of for loop In the unit test CppunitTest_xmlsecurity_pdfsigning use std::vector::insert() in place of a for loop. Change-Id: Ib51f0ec6932210befe3c7aad9a6b5c8989bfe839 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175337 Tested-by: Jenkins Tested-by: Hossein Reviewed-by: Hossein --- xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index d37f9d2f5434..a43cec683fd9 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -102,11 +102,8 @@ std::vector PDFSigningTest::verify(const OUString& rURL, s { CPPUNIT_ASSERT_EQUAL(nCount, aHelper.GetSignatureInformations().size()); } - for (size_t i = 0; i < aHelper.GetSignatureInformations().size(); ++i) - { - const SignatureInformation& rInfo = aHelper.GetSignatureInformations()[i]; - aRet.push_back(rInfo); - } + aRet.insert(aRet.end(), aHelper.GetSignatureInformations().begin(), + aHelper.GetSignatureInformations().end()); return aRet; } -- cgit