c++20: use std::erase(_if) instead of std::remove(_if)+erase (xmlsecurity)

Change-Id: Ia7d9b806667a7c11743f7e9e4bb5525a1202e7fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159712
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2023-11-19 21:52:10 +01:00
parent 63d676e755
commit a761272a68

View File

@@ -521,10 +521,10 @@ void XMLSignatureHelper::ExportSignatureContentTypes(const css::uno::Reference<c
// Remove existing signature overrides.
uno::Sequence<beans::StringPair>& rOverrides = pContentTypeInfo[1];
auto aOverrides = comphelper::sequenceToContainer< std::vector<beans::StringPair> >(rOverrides);
aOverrides.erase(std::remove_if(aOverrides.begin(), aOverrides.end(), [](const beans::StringPair& rPair)
std::erase_if(aOverrides, [](const beans::StringPair& rPair)
{
return rPair.First.startsWith("/_xmlsignatures/sig");
}), aOverrides.end());
});
// Add our signature overrides.
for (int i = 1; i <= nSignatureCount; ++i)