summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/tools.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/tools.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/tools.cxx')
-rw-r--r--slideshow/source/engine/tools.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx
index 3bd58aeaf077..ca98a899fc8e 100644
--- a/slideshow/source/engine/tools.cxx
+++ b/slideshow/source/engine/tools.cxx
@@ -439,17 +439,9 @@ namespace slideshow
const beans::NamedValue* pArray = rSequence.getConstArray();
const size_t nLen( rSequence.getLength() );
- if( nLen == 0 )
- return false;
-
- const beans::NamedValue* pFound = ::std::find_if( pArray,
- pArray + nLen,
- NamedValueComparator( rSearchKey ) );
-
- if( pFound == rSequence.getConstArray() + nLen )
- return false;
-
- return true;
+ return ::std::any_of( pArray,
+ pArray + nLen,
+ NamedValueComparator( rSearchKey ) );
}
basegfx::B2DRange calcRelativeShapeBounds( const basegfx::B2DVector& rPageSize,