From 3bc2154ebf043da3cb2b29e30dac9fff5508a82a Mon Sep 17 00:00:00 2001 From: Sarper Akdemir Date: Mon, 17 Aug 2020 12:56:44 +0300 Subject: fix box2dtools build error for non debug builds Removed the asserts and moved the functions out of the box2DWorld class. Change-Id: Ifa58bceb2c64c1012e5d0e65bc12646312ab1c16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100856 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- slideshow/source/engine/animationfactory.cxx | 2 +- slideshow/source/engine/box2dtools.cxx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'slideshow/source/engine') diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index bc1848f68435..7f5910cfb992 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -434,7 +434,7 @@ namespace slideshow::internal mbAnimationStarted = false; // Animation have ended for this body, make it static - mpBox2DWorld->makeBodyStatic( mpBox2DBody ); + box2d::utils::makeBodyStatic( mpBox2DBody ); if( !(mnFlags & AnimationFactory::FLAG_NO_SPRITE) ) mpShapeManager->leaveAnimationMode( mpShape ); diff --git a/slideshow/source/engine/box2dtools.cxx b/slideshow/source/engine/box2dtools.cxx index c188234105d7..c02a967a5f87 100644 --- a/slideshow/source/engine/box2dtools.cxx +++ b/slideshow/source/engine/box2dtools.cxx @@ -367,9 +367,8 @@ Box2DBodySharedPtr box2DWorld::makeShapeDynamic(const slideshow::internal::Shape return makeBodyDynamic(pBox2DBody); } -Box2DBodySharedPtr box2DWorld::makeBodyDynamic(const Box2DBodySharedPtr& pBox2DBody) +Box2DBodySharedPtr makeBodyDynamic(const Box2DBodySharedPtr& pBox2DBody) { - assert(mpBox2DWorld); if (pBox2DBody->getType() != BOX2D_DYNAMIC_BODY) { pBox2DBody->setType(BOX2D_DYNAMIC_BODY); @@ -384,9 +383,8 @@ Box2DBodySharedPtr box2DWorld::makeShapeStatic(const slideshow::internal::ShapeS return makeBodyStatic(pBox2DBody); } -Box2DBodySharedPtr box2DWorld::makeBodyStatic(const Box2DBodySharedPtr& pBox2DBody) +Box2DBodySharedPtr makeBodyStatic(const Box2DBodySharedPtr& pBox2DBody) { - assert(mpBox2DWorld); if (pBox2DBody->getType() != BOX2D_STATIC_BODY) { pBox2DBody->setType(BOX2D_STATIC_BODY); -- cgit