summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2023-05-24 13:47:22 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-26 12:49:14 +0200
commitb480552d9c4ac9be1f53edc6cac21bc45cfe29ca (patch)
treedea8ae5a372974ad274701282ac27c874a66524c /comphelper
parent2d6dff8d9837c66d5961ea74921306110b9d747b (diff)
replace find_if by none_of
A set of cases where find_if is used just to test if there are no matches; use none_of as per tdf#153109 Change-Id: I6c705ab7a8289914743199722a444ee40d11d746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index d26a30e0ff20..5489690fae6a 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -621,11 +621,10 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
if (eResult == DocPasswordVerifierResult::OK && !aPassword.isEmpty())
{
- if (std::find_if(std::cbegin(aEncData), std::cend(aEncData),
+ if (std::none_of(std::cbegin(aEncData), std::cend(aEncData),
[](const css::beans::NamedValue& val) {
return val.Name == PACKAGE_ENCRYPTIONDATA_SHA256UTF8;
- })
- == std::cend(aEncData))
+ }))
{
// tdf#118639: We need ODF encryption data for autorecovery, where password
// will already be unavailable, so generate and append it here