diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-05-06 19:57:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-06 21:52:00 +0200 |
commit | 18715f6a63af55045b108b98abeffeae8e51518b (patch) | |
tree | 7cfcc6fc8a27c6f0c023d74fac5e43b88ac70907 /xmlsecurity/source/helper | |
parent | b83a8483a1426ba400480d33f7df321fcc02e64d (diff) |
remove unnecessary sequenceToContainer
If we are not going to manipulate the resulting vector, then it is
actually slower, since we have to allocate more storage for the vector
Change-Id: I65677007d105f4783603df74113ebed6db0b551b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/helper')
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 6436f9f7c627..0d9755d0ebe1 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -335,11 +335,10 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorage(const uno::Reference<embe for (sal_Int32 i = 0; i < aRelationsInfo.getLength(); ++i) { const uno::Sequence<beans::StringPair>& rRelation = aRelationsInfo[i]; - auto aRelation = comphelper::sequenceToContainer< std::vector<beans::StringPair> >(rRelation); - if (std::any_of(aRelation.begin(), aRelation.end(), lcl_isSignatureType)) + if (std::any_of(rRelation.begin(), rRelation.end(), lcl_isSignatureType)) { - std::vector<beans::StringPair>::iterator it = std::find_if(aRelation.begin(), aRelation.end(), [](const beans::StringPair& rPair) { return rPair.First == "Target"; }); - if (it != aRelation.end()) + auto it = std::find_if(rRelation.begin(), rRelation.end(), [](const beans::StringPair& rPair) { return rPair.First == "Target"; }); + if (it != rRelation.end()) { if (xStorage.is() && !xStorage->hasByName(it->Second)) { |