summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/activities
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 13:21:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-25 07:06:10 +0100
commitcee62b1068775b7d0bcd2875e9789c8c36c22057 (patch)
treec093300a02cc6dc5db73ba0a51067cc480ddfdf5 /slideshow/source/engine/activities
parenta46e768810e82abaf98e5cef02c697c718877974 (diff)
loplugin:makeshared in slideshow
Change-Id: I87dead1ed09aa50c939c03ae8ed3faf9300a8b4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow/source/engine/activities')
-rw-r--r--slideshow/source/engine/activities/activitiesfactory.cxx28
1 files changed, 12 insertions, 16 deletions
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx
index eee0f55cda2d..63b39d2d23d5 100644
--- a/slideshow/source/engine/activities/activitiesfactory.cxx
+++ b/slideshow/source/engine/activities/activitiesfactory.cxx
@@ -420,15 +420,14 @@ AnimationActivitySharedPtr createFromToByActivity(
aBy = aTmpValue;
}
- return AnimationActivitySharedPtr(
- new FromToByActivity<BaseType, AnimationType>(
+ return std::make_shared<FromToByActivity<BaseType, AnimationType>>(
aFrom,
aTo,
aBy,
rParms,
rAnim,
rInterpolator,
- bCumulative ) );
+ bCumulative );
}
/* The following table shows which animator combines with
@@ -630,13 +629,12 @@ AnimationActivitySharedPtr createValueListActivity(
aValueVector.push_back( aValue );
}
- return AnimationActivitySharedPtr(
- new ValuesActivity<BaseType, AnimationType>(
+ return std::make_shared<ValuesActivity<BaseType, AnimationType>>(
aValueVector,
rParms,
rAnim,
rInterpolator,
- bCumulative ) );
+ bCumulative );
}
/** Generate Activity for given XAnimate, corresponding to given Value vector
@@ -741,10 +739,10 @@ AnimationActivitySharedPtr createActivity(
{
// since DiscreteActivityBase suspends itself
// between the frames, create a WakeupEvent for it.
- aActivityParms.mpWakeupEvent.reset(
- new WakeupEvent(
+ aActivityParms.mpWakeupEvent =
+ std::make_shared<WakeupEvent>(
rParms.mrEventQueue.getTimer(),
- rParms.mrActivitiesQueue ) );
+ rParms.mrActivitiesQueue );
AnimationActivitySharedPtr pActivity(
createValueListActivity< DiscreteActivityBase >(
@@ -805,10 +803,10 @@ AnimationActivitySharedPtr createActivity(
// since DiscreteActivityBase suspends itself
// between the frames, create a WakeupEvent for it.
- aActivityParms.mpWakeupEvent.reset(
- new WakeupEvent(
+ aActivityParms.mpWakeupEvent =
+ std::make_shared<WakeupEvent>(
rParms.mrEventQueue.getTimer(),
- rParms.mrActivitiesQueue ) );
+ rParms.mrActivitiesQueue );
AnimationActivitySharedPtr pActivity(
createFromToByActivity< DiscreteActivityBase >(
@@ -1008,11 +1006,9 @@ AnimationActivitySharedPtr ActivitiesFactory::createSimpleActivity(
rParms.mbAutoReverse );
if( bDirectionForward )
- return AnimationActivitySharedPtr(
- new SimpleActivity<1>( aActivityParms, rAnim ) );
+ return std::make_shared<SimpleActivity<1>>( aActivityParms, rAnim );
else
- return AnimationActivitySharedPtr(
- new SimpleActivity<0>( aActivityParms, rAnim ) );
+ return std::make_shared<SimpleActivity<0>>( aActivityParms, rAnim );
}
} // namespace internal