vcl/source/animate/Animation.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
New commits: commit 007d6b5b9e7c94ab93b2798f832467c26291cf31 Author: Adrien Ollier <adr.oll...@hotmail.fr> AuthorDate: Sun May 5 01:06:41 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun May 5 08:03:30 2019 +0200 using STL and lambda expressions is better Change-Id: I0224dccb130ead02da46f2376b3df5ec889f8e8c Signed-off-by: Adrien Ollier <adr.oll...@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/71812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx index 9462d0e75a74..1382178aa6a0 100644 --- a/vcl/source/animate/Animation.cxx +++ b/vcl/source/animate/Animation.cxx @@ -229,16 +229,11 @@ bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDes void Animation::Stop(OutputDevice* pOut, long nExtraData) { - for (size_t i = 0; i < maViewList.size();) - { - ImplAnimView* pView = maViewList[i].get(); - if (pView->matches(pOut, nExtraData)) - { - maViewList.erase(maViewList.begin() + i); - } - else - i++; - } + maViewList.erase(std::remove_if(maViewList.begin(), maViewList.end(), + [=](const std::unique_ptr<ImplAnimView>& pAnimView) -> bool { + return pAnimView->matches(pOut, nExtraData); + }), + maViewList.end()); if (maViewList.empty()) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits