summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-10-14 12:00:03 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-14 17:30:32 +0200
commit19be86249dcc5b13b3c95f5469600fa2bc1b749b (patch)
treee1468590650eea60e3897a8cb8b7c36bb9ab996b /vcl/osx
parent7758115d15ded2afd81946df0865ecc831b179aa (diff)
Simplify containers iterations in vcl
Use range-based loop or replace with STL functions. Change-Id: Ide2f89194238ae6a1f21e8132e2297710d9e6dcd Reviewed-on: https://gerrit.libreoffice.org/61756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salnativewidgets.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 9e5008703549..d89fecf1681e 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -74,12 +74,10 @@ public:
void AquaBlinker::Blink( AquaSalFrame* pFrame, const tools::Rectangle& rRect, int nTimeout )
{
// prevent repeated paints from triggering themselves all the time
- for( std::list< AquaBlinker* >::const_iterator it = pFrame->maBlinkers.begin();
- it != pFrame->maBlinkers.end(); ++it )
- {
- if( (*it)->maInvalidateRect == rRect )
- return;
- }
+ auto isRepeated = std::any_of(pFrame->maBlinkers.begin(), pFrame->maBlinkers.end(),
+ [&rRect](AquaBlinker* pBlinker) { return pBlinker->maInvalidateRect == rRect; });
+ if( isRepeated )
+ return;
AquaBlinker* pNew = new AquaBlinker( pFrame, rRect );
pNew->SetTimeout( nTimeout );
pNew->Start();