diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-03 12:08:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-03 14:42:43 +0200 |
commit | 41aad592685b0b36c2e5f1033e7263aef406c28b (patch) | |
tree | dbc83f9a33f1d714327dc2da5e8d9ecdaaddf87a /slideshow/source/engine/activities | |
parent | 4afb80eaa0df58b78e2bfad892f9e7ce5e1bce7a (diff) |
clang-tidy modernize-pass-by-value in slideshow
Change-Id: I89a56aa3d267f22665769ba073a47d1208d8b55d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137745
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.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx index 2dadfea49e1c..eb0f6fdd0840 100644 --- a/slideshow/source/engine/activities/activitiesfactory.cxx +++ b/slideshow/source/engine/activities/activitiesfactory.cxx @@ -38,6 +38,7 @@ #include <optional> #include <memory> +#include <utility> #include <vector> #include <algorithm> @@ -140,15 +141,15 @@ public: value, or start fresh each time. */ FromToByActivity( - const OptionalValueType& rFrom, + OptionalValueType aFrom, const OptionalValueType& rTo, const OptionalValueType& rBy, const ActivityParameters& rParms, - const ::std::shared_ptr< AnimationType >& rAnim, + ::std::shared_ptr< AnimationType > xAnim, const Interpolator< ValueType >& rInterpolator, bool bCumulative ) : BaseType( rParms ), - maFrom( rFrom ), + maFrom(std::move( aFrom )), maTo( rTo ), maBy( rBy ), mpFormula( rParms.mpFormula ), @@ -157,7 +158,7 @@ public: maPreviousValue(), maStartInterpolationValue(), mnIteration( 0 ), - mpAnim( rAnim ), + mpAnim(std::move( xAnim )), maInterpolator( rInterpolator ), mbDynamicStartValue( false ), mbCumulative( bCumulative ) @@ -508,13 +509,13 @@ public: ValuesActivity( const ValueVectorType& rValues, const ActivityParameters& rParms, - const std::shared_ptr<AnimationType>& rAnim, + std::shared_ptr<AnimationType> xAnim, const Interpolator< ValueType >& rInterpolator, bool bCumulative ) : BaseType( rParms ), maValues( rValues ), mpFormula( rParms.mpFormula ), - mpAnim( rAnim ), + mpAnim(std::move( xAnim )), maInterpolator( rInterpolator ), mbCumulative( bCumulative ) { @@ -864,9 +865,9 @@ public: Standard Activity parameter struct */ SimpleActivity( const ActivityParameters& rParms, - const NumberAnimationSharedPtr& rAnim ) : + NumberAnimationSharedPtr xAnim ) : ContinuousActivityBase( rParms ), - mpAnim( rAnim ) + mpAnim(std::move( xAnim )) { ENSURE_OR_THROW( mpAnim, "Invalid animation object" ); } |