summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-06 15:32:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-06 18:37:47 +0200
commit1f8fbff65d91f1d8297b94dd67fffceb7475dce5 (patch)
tree35ecc29ca2734db28e69cfb22c54e0e2d0ad3580 /slideshow/source
parent4bc31abb56f806ee399344160ce0d7c27af48f5e (diff)
loplugin:const* make some params and methods const
Change-Id: I97c5bbb929a2a4a029af4e6cb0fd571bbc2b698b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104030 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/box2dtools.cxx10
-rw-r--r--slideshow/source/inc/box2dtools.hxx10
2 files changed, 10 insertions, 10 deletions
diff --git a/slideshow/source/engine/box2dtools.cxx b/slideshow/source/engine/box2dtools.cxx
index e863616b2187..db91ccbb57e7 100644
--- a/slideshow/source/engine/box2dtools.cxx
+++ b/slideshow/source/engine/box2dtools.cxx
@@ -443,7 +443,7 @@ void box2DWorld::initateAllShapesAsStaticBodies(
}
}
-bool box2DWorld::hasWorldStepper() { return mbHasWorldStepper; }
+bool box2DWorld::hasWorldStepper() const { return mbHasWorldStepper; }
void box2DWorld::setHasWorldStepper(const bool bHasWorldStepper)
{
@@ -636,7 +636,7 @@ double box2DWorld::stepAmount(const double fPassedTime, const float fTimeStep,
bool box2DWorld::shapesInitialized() { return mbShapesInitialized; }
-bool box2DWorld::isInitialized()
+bool box2DWorld::isInitialized() const
{
if (mpBox2DWorld)
return true;
@@ -777,7 +777,7 @@ box2DBody::box2DBody(std::shared_ptr<b2Body> pBox2DBody, double fScaleFactor)
{
}
-::basegfx::B2DPoint box2DBody::getPosition()
+::basegfx::B2DPoint box2DBody::getPosition() const
{
b2Vec2 aPosition = mpBox2DBody->GetPosition();
double fX = static_cast<double>(aPosition.x) / mfScaleFactor;
@@ -849,7 +849,7 @@ void box2DBody::setCollision(const bool bCanCollide)
}
}
-double box2DBody::getAngle()
+double box2DBody::getAngle() const
{
double fAngle = static_cast<double>(mpBox2DBody->GetAngle());
return ::basegfx::rad2deg(-fAngle);
@@ -887,7 +887,7 @@ void box2DBody::setType(box2DBodyType eType)
mpBox2DBody->SetType(getBox2DInternalBodyType(eType));
}
-box2DBodyType box2DBody::getType() { return getBox2DLOBodyType(mpBox2DBody->GetType()); }
+box2DBodyType box2DBody::getType() const { return getBox2DLOBodyType(mpBox2DBody->GetType()); }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/slideshow/source/inc/box2dtools.hxx b/slideshow/source/inc/box2dtools.hxx
index c17fb1648a51..53eaf0b88fad 100644
--- a/slideshow/source/inc/box2dtools.hxx
+++ b/slideshow/source/inc/box2dtools.hxx
@@ -261,7 +261,7 @@ public:
/// @return whether shapes in the slide are initialized as Box2D bodies or not
bool shapesInitialized();
/// @return whether the Box2D World is initialized or not
- bool isInitialized();
+ bool isInitialized() const;
/** Make the shape's corresponding box2D body a dynamic one.
@@ -311,7 +311,7 @@ public:
initateAllShapesAsStaticBodies(const slideshow::internal::ShapeManagerSharedPtr& pShapeManager);
/// @return whether the box2DWorld has a stepper or not
- bool hasWorldStepper();
+ bool hasWorldStepper() const;
/// Set the flag for whether the box2DWorld has a stepper or not
void setHasWorldStepper(const bool bHasWorldStepper);
@@ -375,7 +375,7 @@ public:
box2DBody(std::shared_ptr<b2Body> pBox2DBody, double fScaleFactor);
/// @return current position in LO user space coordinates
- ::basegfx::B2DPoint getPosition();
+ ::basegfx::B2DPoint getPosition() const;
/** Set the position of box2d body
@@ -429,7 +429,7 @@ public:
void setCollision(const bool bCanCollide);
/// @return current angle of rotation of the body
- double getAngle();
+ double getAngle() const;
/** Set angle of the box2d body
@@ -459,7 +459,7 @@ public:
void setType(box2DBodyType eType);
/// @return type of the body
- box2DBodyType getType();
+ box2DBodyType getType() const;
};
/** Make the Box2D body a dynamic one