summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/shapes/drawshape.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-05-12 19:54:36 +0900
committerMichael Stahl <mstahl@redhat.com>2015-05-13 10:50:47 +0000
commit19ba9e08cab4ff75595f53b9689989495ff5f625 (patch)
treef57962ba2676494201a874777329ed949a3f7be8 /slideshow/source/engine/shapes/drawshape.cxx
parent595a109f8f5cd19cc72e1e44f2ae111427bb4330 (diff)
slideshow: simplify code by replacing std::find_if by std::any_of/std::none_of
Change-Id: Ib8eec5074e82127e11f4fba2c0b143ab8cef3bcc Reviewed-on: https://gerrit.libreoffice.org/15714 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'slideshow/source/engine/shapes/drawshape.cxx')
-rw-r--r--slideshow/source/engine/shapes/drawshape.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index 7c77a3c15f2b..875dffebb58c 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -632,16 +632,14 @@ namespace slideshow
void DrawShape::addViewLayer( const ViewLayerSharedPtr& rNewLayer,
bool bRedrawLayer )
{
- ViewShapeVector::iterator aEnd( maViewShapes.end() );
-
// already added?
- if( ::std::find_if( maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ if( ::std::any_of( maViewShapes.begin(),
+ maViewShapes.end(),
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewShape::getViewLayer,
_1 ),
- ::boost::cref( rNewLayer ) ) ) != aEnd )
+ ::boost::cref( rNewLayer ) ) ))
{
// yes, nothing to do
return;