summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorChris Gill <chrisgill948@gmail.com>2024-10-17 17:53:32 +0100
committerHossein <hossein@libreoffice.org>2024-11-02 22:32:34 +0100
commit594554e07a952c1aaee9b96d4259bc8418b46ee9 (patch)
treeac7446a02e0f5f382498c531647b937dacab1fbc /xmlsecurity
parentad686b26cec93653b67642f79bace16df0fd1348 (diff)
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 <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx7
1 files changed, 2 insertions, 5 deletions
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<SignatureInformation> 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;
}