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 <jonathan@libreoffice.org>
This commit is contained in:
committed by
Jonathan Clark
parent
51232f090f
commit
4b87a93e7f
@@ -83,11 +83,10 @@ bool SequentialTimeContainer::resolveChild(
|
||||
mpCurrentSkipEvent->dispose();
|
||||
|
||||
// event that will deactivate the resolved/running child:
|
||||
auto pSelf = std::dynamic_pointer_cast<SequentialTimeContainer>(getSelf());
|
||||
mpCurrentSkipEvent = makeEvent(
|
||||
std::bind( &SequentialTimeContainer::skipEffect,
|
||||
std::dynamic_pointer_cast<SequentialTimeContainer>( 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(
|
||||
|
||||
Reference in New Issue
Block a user