Commit 03b118a1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use override

parent 8598d13f
Pipeline #135613 passed with stage
in 45 seconds
......@@ -28,23 +28,23 @@ public:
b2CircleShape();
/// Implement b2Shape.
b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
b2Shape* Clone(b2BlockAllocator* allocator) const override;
/// @see b2Shape::GetChildCount
int32 GetChildCount() const Q_DECL_OVERRIDE;
int32 GetChildCount() const override;
/// Implement b2Shape.
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeAABB
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeMass
void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
void ComputeMass(b2MassData* massData, qreal density) const override;
/// Get the supporting vertex index in the given direction.
int32 GetSupport(const b2Vec2& d) const;
......
......@@ -33,23 +33,23 @@ public:
void Set(const b2Vec2& v1, const b2Vec2& v2);
/// Implement b2Shape.
b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
b2Shape* Clone(b2BlockAllocator* allocator) const override;
/// @see b2Shape::GetChildCount
int32 GetChildCount() const Q_DECL_OVERRIDE;
int32 GetChildCount() const override;
/// @see b2Shape::TestPoint
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeAABB
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeMass
void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
void ComputeMass(b2MassData* massData, qreal density) const override;
/// These are the edge vertices
b2Vec2 m_vertex1, m_vertex2;
......
......@@ -40,28 +40,28 @@ public:
void Create(const b2Vec2* vertices, int32 count);
/// Implement b2Shape. Vertices are cloned using b2Alloc.
b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
b2Shape* Clone(b2BlockAllocator* allocator) const override;
/// @see b2Shape::GetChildCount
int32 GetChildCount() const Q_DECL_OVERRIDE;
int32 GetChildCount() const override;
/// Get a child edge.
void GetChildEdge(b2EdgeShape* edge, int32 index) const;
/// This always return false.
/// @see b2Shape::TestPoint
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeAABB
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override;
/// Chains have zero mass.
/// @see b2Shape::ComputeMass
void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
void ComputeMass(b2MassData* massData, qreal density) const override;
/// Get the number of vertices.
int32 GetCount() const { return m_count; }
......
......@@ -31,10 +31,10 @@ public:
b2PolygonShape();
/// Implement b2Shape.
b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
b2Shape* Clone(b2BlockAllocator* allocator) const override;
/// @see b2Shape::GetChildCount
int32 GetChildCount() const Q_DECL_OVERRIDE;
int32 GetChildCount() const override;
/// Copy vertices. This assumes the vertices define a convex polygon.
/// It is assumed that the exterior is the the right of each edge.
......@@ -54,17 +54,17 @@ public:
void SetAsBox(qreal hx, qreal hy, const b2Vec2& center, qreal angle);
/// @see b2Shape::TestPoint
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeAABB
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override;
/// @see b2Shape::ComputeMass
void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
void ComputeMass(b2MassData* massData, qreal density) const override;
/// Get the vertex count.
int32 GetVertexCount() const { return m_vertexCount; }
......
......@@ -33,7 +33,7 @@ public:
b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2CircleContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -33,7 +33,7 @@ public:
b2EdgeAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2EdgeAndCircleContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -33,7 +33,7 @@ public:
b2EdgeAndPolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2EdgeAndPolygonContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -33,7 +33,7 @@ public:
b2LoopAndCircleContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);
~b2LoopAndCircleContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -33,7 +33,7 @@ public:
b2LoopAndPolygonContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);
~b2LoopAndPolygonContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -32,7 +32,7 @@ public:
b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2PolygonAndCircleContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -33,7 +33,7 @@ public:
b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2PolygonContact() override {}
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override;
};
#endif
......@@ -67,16 +67,16 @@ class b2DistanceJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
/// Get the reaction force given the inverse time step.
/// Unit is N.
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
/// Get the reaction torque given the inverse time step.
/// Unit is N*m. This is always zero for a distance joint.
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Set/get the natural length.
/// Manipulating the length can lead to non-physical behavior when the frequency is zero.
......@@ -96,9 +96,9 @@ protected:
friend class b2Joint;
b2DistanceJoint(const b2DistanceJointDef* data);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_localAnchor1;
b2Vec2 m_localAnchor2;
......
......@@ -55,11 +55,11 @@ struct b2FrictionJointDef : public b2JointDef
class b2FrictionJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Set the maximum friction force in N.
void SetMaxForce(qreal force);
......@@ -79,9 +79,9 @@ protected:
b2FrictionJoint(const b2FrictionJointDef* def);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_localAnchorA;
b2Vec2 m_localAnchorB;
......
......@@ -60,11 +60,11 @@ struct b2GearJointDef : public b2JointDef
class b2GearJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Set/Get the gear ratio.
void SetRatio(qreal ratio);
......@@ -75,9 +75,9 @@ protected:
friend class b2Joint;
b2GearJoint(const b2GearJointDef* data);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Body* m_ground1;
b2Body* m_ground2;
......
......@@ -82,11 +82,11 @@ struct b2LineJointDef : public b2JointDef
class b2LineJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Get the current joint translation, usually in meters.
qreal GetJointTranslation() const;
......@@ -133,9 +133,9 @@ protected:
friend class b2Joint;
b2LineJoint(const b2LineJointDef* def);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_localAnchor1;
b2Vec2 m_localAnchor2;
......
......@@ -62,16 +62,16 @@ class b2MouseJoint : public b2Joint
public:
/// Implements b2Joint.
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
/// Implements b2Joint.
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const override;
/// Implements b2Joint.
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
/// Implements b2Joint.
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Use this to update the target point.
void SetTarget(const b2Vec2& target);
......@@ -94,9 +94,9 @@ protected:
b2MouseJoint(const b2MouseJointDef* def);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE { B2_NOT_USED(baumgarte); return true; }
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override { B2_NOT_USED(baumgarte); return true; }
b2Vec2 m_localAnchor;
b2Vec2 m_target;
......
......@@ -87,11 +87,11 @@ struct b2PrismaticJointDef : public b2JointDef
class b2PrismaticJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Get the current joint translation, usually in meters.
qreal GetJointTranslation() const;
......@@ -137,9 +137,9 @@ protected:
friend class b2GearJoint;
b2PrismaticJoint(const b2PrismaticJointDef* def);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_localAnchor1;
b2Vec2 m_localAnchor2;
......
......@@ -86,11 +86,11 @@ struct b2PulleyJointDef : public b2JointDef
class b2PulleyJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Get the first ground anchor.
b2Vec2 GetGroundAnchorA() const;
......@@ -112,9 +112,9 @@ protected:
friend class b2Joint;
b2PulleyJoint(const b2PulleyJointDef* data);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_groundAnchor1;
b2Vec2 m_groundAnchor2;
......
......@@ -90,8 +90,8 @@ struct b2RevoluteJointDef : public b2JointDef
class b2RevoluteJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
/// Get the current joint angle in radians.
qreal GetJointAngle() const;
......@@ -131,11 +131,11 @@ public:
/// Get the reaction force given the inverse time step.
/// Unit is N.
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
/// Get the reaction torque due to the joint limit given the inverse time step.
/// Unit is N*m.
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Get the current motor torque given the inverse time step.
/// Unit is N*m.
......@@ -148,10 +148,10 @@ protected:
b2RevoluteJoint(const b2RevoluteJointDef* def);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_localAnchor1; // relative
b2Vec2 m_localAnchor2;
......
......@@ -58,11 +58,11 @@ struct b2RopeJointDef : public b2JointDef
class b2RopeJoint : public b2Joint
{
public:
b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
b2Vec2 GetAnchorA() const override;
b2Vec2 GetAnchorB() const override;
b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
b2Vec2 GetReactionForce(qreal inv_dt) const override;
qreal GetReactionTorque(qreal inv_dt) const override;
/// Get the maximum length of the rope.
qreal GetMaxLength() const;
......@@ -74,9 +74,9 @@ protected:
friend class b2Joint;
b2RopeJoint(const b2RopeJointDef* data);
void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
void InitVelocityConstraints(const b2TimeStep& step) override;
void SolveVelocityConstraints(const b2TimeStep& step) override;
bool SolvePositionConstraints(qreal baumgarte) override;
b2Vec2 m_localAnchorA;
b2Vec2 m_localAnchorB;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment