summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-08-29 00:47:33 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 11:40:29 +0200
commit085269d25a705b656436feac47149296b4b4b35d (patch)
tree3195c0526652ebd9e125507aa17cd15b2acfb368 /shell
parentb0e74b65a86eb965c3e93da2fb77972cc5445f3c (diff)
Replace find_if with proper quantifier algorithms
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx4
-rw-r--r--shell/source/win32/zipfile/zipfile.cxx4
2 files changed, 2 insertions, 6 deletions
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 0742e8b8912d..067c968f4814 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -98,10 +98,8 @@ namespace /* private */ {
bool has_group(const string_t& name) const
{
- auto iter_end = groups_.cend();
return (has_groups() &&
- iter_end != std::find_if(
- groups_.cbegin(), iter_end,
+ std::any_of(groups_.cbegin(), groups_.cend(),
[&name](const string_t& s)
{ return (0 == strcasecmp(s.c_str(), name.c_str())); })
// compare two string_t's case insensitive
diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index 0cf7f204cf7e..f7f8ccd23806 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -535,10 +535,8 @@ bool ZipFile::HasContent(const std::string &ContentName) const
//case in-sensitive as it is not defined that such
//names must be handled case sensitive
DirectoryPtr_t dir = GetDirectory();
- Directory_t::iterator iter =
- std::find_if(dir->begin(), dir->end(), internal::stricmp(ContentName));
- return (iter != dir->end());
+ return std::any_of(dir->begin(), dir->end(), internal::stricmp(ContentName));
}