From 4b87a93e7ff4e58d98d8b1d24d9661988e15207d Mon Sep 17 00:00:00 2001 From: Aryan Mishra Date: Wed, 18 Mar 2026 17:37:36 +0530 Subject: [PATCH] tdf#165233 Use lambdas instead of std::bind in SequentialTimeContainer Replaces the std::bind in SequentialTimeContainer::resolveChild with a C++ lambda to improve readability and performance. Change-Id: I296e7059f3f9125f5499de432b3c5c42425ef501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201992 Tested-by: Jenkins Reviewed-by: Jonathan Clark --- .../engine/animationnodes/sequentialtimecontainer.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx index eee8eaf3ed21..c4b14f5f2ae7 100644 --- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx @@ -83,11 +83,10 @@ bool SequentialTimeContainer::resolveChild( mpCurrentSkipEvent->dispose(); // event that will deactivate the resolved/running child: + auto pSelf = std::dynamic_pointer_cast(getSelf()); mpCurrentSkipEvent = makeEvent( - std::bind( &SequentialTimeContainer::skipEffect, - std::dynamic_pointer_cast( getSelf() ), - pChildNode ), - u"SequentialTimeContainer::skipEffect, resolveChild"_ustr); + ([pSelf, pChildNode] () { pSelf->skipEffect(pChildNode); }), + u"SequentialTimeContainer::skipEffect, resolveChild"_ustr ); // deactivate child node when skip event occurs: getContext().mrUserEventQueue.registerSkipEffectEvent(