summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerQueue.cxx5
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx8
2 files changed, 4 insertions, 9 deletions
diff --git a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
index 8b9a167ad20f..5493c2be72fb 100644
--- a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
@@ -239,11 +239,10 @@ IMPL_LINK(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer, void
bool MasterPageContainerQueue::HasRequest (MasterPageContainer::Token aToken) const
{
- RequestQueue::iterator iRequest (::std::find_if(
+ return std::any_of(
mpRequestQueue->begin(),
mpRequestQueue->end(),
- PreviewCreationRequest::CompareToken(aToken)));
- return (iRequest != mpRequestQueue->end());
+ PreviewCreationRequest::CompareToken(aToken));
}
bool MasterPageContainerQueue::IsEmpty() const
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index dc9292201715..fb8eaba84484 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -518,11 +518,7 @@ void ViewShellManager::Implementation::ActivateSubShell (
::osl::MutexGuard aGuard (maMutex);
// Check that the given view shell is active.
- ActiveShellList::iterator iShell (::std::find_if (
- maActiveViewShells.begin(),
- maActiveViewShells.end(),
- IsShell(&rParentShell)));
- if (iShell == maActiveViewShells.end())
+ if (std::none_of (maActiveViewShells.begin(), maActiveViewShells.end(), IsShell(&rParentShell)))
return;
// Create the sub shell list if it does not yet exist.
@@ -533,7 +529,7 @@ void ViewShellManager::Implementation::ActivateSubShell (
// Do not activate an object bar that is already active. Requesting
// this is not exactly an error but may be an indication of one.
SubShellSubList& rList (iList->second);
- if (::std::find_if(rList.begin(),rList.end(), IsId(nId)) != rList.end())
+ if (std::any_of(rList.begin(),rList.end(), IsId(nId)))
return;
// Add just the id of the sub shell. The actual shell is created