summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-25 15:26:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-25 16:47:46 +0200
commitff87ef83edf77ba0a9bf11bb8e5306e3b8c7cb04 (patch)
tree763d41b8f0a7d82eab2d79aca4bb339a1185b9cc /slideshow/source
parent0bbc397dc5b4440144627330c2b6ee479bdcf074 (diff)
-Werror=maybe-uninitialized
which only shows up in an optimised build, using gcc Change-Id: I16015c7d139680aba11bf183c3e2bceb79c9ecba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/animationnodes/animationphysicsnode.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/slideshow/source/engine/animationnodes/animationphysicsnode.cxx b/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
index 3c7c227f2d0c..c750d333322a 100644
--- a/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
@@ -41,39 +41,31 @@ AnimationActivitySharedPtr AnimationPhysicsNode::createActivity() const
"Couldn't get the animation duration.");
::css::uno::Any aTemp;
- double fStartVelocityX;
+ double fStartVelocityX = fDefaultStartVelocityX;
aTemp = mxPhysicsMotionNode->getStartVelocityX();
if (aTemp.hasValue())
aTemp >>= fStartVelocityX;
- else
- fStartVelocityX = fDefaultStartVelocityX;
- double fStartVelocityY;
+ double fStartVelocityY = fDefaultStartVelocityY;
aTemp = mxPhysicsMotionNode->getStartVelocityY();
if (aTemp.hasValue())
aTemp >>= fStartVelocityY;
- else
- fStartVelocityY = fDefaultStartVelocityY;
- double fDensity;
+ double fDensity = fDefaultDensity;
aTemp = mxPhysicsMotionNode->getDensity();
if (aTemp.hasValue())
{
aTemp >>= fDensity;
fDensity = (fDensity < 0.0) ? 0.0 : fDensity;
}
- else
- fDensity = fDefaultDensity;
- double fBounciness;
+ double fBounciness = fDefaultBounciness;
aTemp = mxPhysicsMotionNode->getBounciness();
if (aTemp.hasValue())
{
aTemp >>= fBounciness;
fBounciness = std::clamp(fBounciness, 0.0, 1.0);
}
- else
- fBounciness = fDefaultBounciness;
ActivitiesFactory::CommonParameters const aParms(fillCommonParameters());
return ActivitiesFactory::createSimpleActivity(