summaryrefslogtreecommitdiff
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/source/propctrlr/cellbindinghelper.cxx6
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx4
2 files changed, 3 insertions, 7 deletions
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx
index 85b0353ca738..7942a4200563 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -381,15 +381,11 @@ namespace pcr
if ( xDocumentFactory.is() )
aAvailableServices = xDocumentFactory->getAvailableServiceNames( );
- const OUString* pFound = std::find_if(
+ bYesItIs = std::any_of(
aAvailableServices.begin(),
aAvailableServices.end(),
StringCompare( _rService )
);
- if ( pFound != aAvailableServices.end() )
- {
- bYesItIs = true;
- }
}
return bYesItIs;
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 8492d115e0d6..4cfbfe1e12ca 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -966,12 +966,12 @@ namespace pcr
aProperties.reserve( aProperties.size() + aThisHandlersProperties.size() );
for (const auto & aThisHandlersPropertie : aThisHandlersProperties)
{
- std::vector< Property >::const_iterator previous = std::find_if(
+ auto noPrevious = std::none_of(
aProperties.begin(),
aProperties.end(),
FindPropertyByName( aThisHandlersPropertie.Name )
);
- if ( previous == aProperties.end() )
+ if ( noPrevious )
{
aProperties.push_back( aThisHandlersPropertie );
continue;