Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up functions that trigger GCC9 warnings #261

Merged
merged 1 commit into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tpe/lib/src/AABBTree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ AABBTree::AABBTree()
}

//////////////////////////////////////////////////
AABBTree::~AABBTree()
{
}
AABBTree::~AABBTree() = default;

//////////////////////////////////////////////////
void AABBTree::AddNode(std::size_t _id, const math::AxisAlignedBox &_aabb)
Expand Down
2 changes: 1 addition & 1 deletion tpe/lib/src/Collision.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE Collision : public Entity
public: Collision(const Collision &_other);

/// \brief Destructor
public: ~Collision();
public: virtual ~Collision();

/// \brief Assignment operator
/// \param[in] _other collision
Expand Down
4 changes: 1 addition & 3 deletions tpe/lib/src/CollisionDetector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ CollisionDetector::CollisionDetector()
}

//////////////////////////////////////////////////
CollisionDetector::~CollisionDetector()
{
}
CollisionDetector::~CollisionDetector() = default;

//////////////////////////////////////////////////
std::vector<Contact> CollisionDetector::CheckCollisions(
Expand Down
2 changes: 1 addition & 1 deletion tpe/lib/src/Entity.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE Entity
protected: explicit Entity(std::size_t _id);

/// \brief Destructor
public: ~Entity();
public: virtual ~Entity();

/// \brief Assignment operator
/// \param[in] _other Other entity to copy from
Expand Down
2 changes: 1 addition & 1 deletion tpe/lib/src/Link.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE Link : public Entity
public: explicit Link(std::size_t _id);

/// \brief Destructor
public: ~Link() = default;
public: virtual ~Link() = default;

/// \brief Add a collision
/// \return Newly created Collision
Expand Down
2 changes: 1 addition & 1 deletion tpe/lib/src/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE Model : public Entity
public: explicit Model(std::size_t _id);

/// \brief Destructor
public: ~Model();
public: virtual ~Model();

/// \brief Add a link
/// \return Newly created Link
Expand Down
35 changes: 0 additions & 35 deletions tpe/lib/src/Shape.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ BoxShape::BoxShape() : Shape()
this->type = ShapeType::BOX;
}

//////////////////////////////////////////////////
BoxShape::BoxShape(const BoxShape &_other)
: Shape()
{
*this = _other;
}

//////////////////////////////////////////////////
BoxShape::~BoxShape()
{
}

//////////////////////////////////////////////////
Shape &BoxShape::operator=(const Shape &_other)
{
Expand Down Expand Up @@ -103,13 +91,6 @@ CylinderShape::CylinderShape() : Shape()
this->type = ShapeType::CYLINDER;
}

//////////////////////////////////////////////////
CylinderShape::CylinderShape(const CylinderShape &_other)
: Shape()
{
*this = _other;
}

//////////////////////////////////////////////////
Shape &CylinderShape::operator=(const Shape &_other)
{
Expand Down Expand Up @@ -158,13 +139,6 @@ SphereShape::SphereShape() : Shape()
this->type = ShapeType::SPHERE;
}

//////////////////////////////////////////////////
SphereShape::SphereShape(const SphereShape &_other)
: Shape()
{
*this = _other;
}

//////////////////////////////////////////////////
Shape &SphereShape::operator=(const Shape &_other)
{
Expand Down Expand Up @@ -199,13 +173,6 @@ MeshShape::MeshShape() : Shape()
this->type = ShapeType::MESH;
}

//////////////////////////////////////////////////
MeshShape::MeshShape(const MeshShape &_other)
: Shape()
{
*this = _other;
}

//////////////////////////////////////////////////
Shape &MeshShape::operator=(const Shape &_other)
{
Expand Down Expand Up @@ -245,5 +212,3 @@ void MeshShape::UpdateBoundingBox()
this->bbox = math::AxisAlignedBox(
this->scale * this->meshAABB.Min(), this->scale * this->meshAABB.Max());
}


26 changes: 5 additions & 21 deletions tpe/lib/src/Shape.hh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE Shape
public: Shape();

/// \brief Destructor
public: ~Shape() = default;
public: virtual ~Shape() = default;

/// \brief Get bounding box of shape
/// \return Shape's bounding box
Expand Down Expand Up @@ -92,12 +92,8 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE BoxShape : public Shape
/// \brief Constructor
public: BoxShape();

/// \brief Copy Constructor
/// \param[in] _other shape to copy from
public: BoxShape(const BoxShape &_other);

/// \brief Destructor
public: ~BoxShape();
public: virtual ~BoxShape() = default;

/// \brief Assignment operator
/// \param[in] _other shape to copy from
Expand Down Expand Up @@ -126,12 +122,8 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE CylinderShape : public Shape
/// \brief Constructor
public: CylinderShape();

/// \brief Copy Constructor
/// \param[in] _other shape to copy from
public: CylinderShape(const CylinderShape &_other);

/// \brief Destructor
public: ~CylinderShape() = default;
public: virtual ~CylinderShape() = default;

/// \brief Assignment operator
/// \param[in] _other shape to copy from
Expand Down Expand Up @@ -169,12 +161,8 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE SphereShape : public Shape
/// \brief Constructor
public: SphereShape();

/// \brief Copy Constructor
/// \param[in] _other shape to copy from
public: SphereShape(const SphereShape &_other);

/// \brief Destructor
public: ~SphereShape() = default;
public: virtual ~SphereShape() = default;

/// \brief Assignment operator
/// \param[in] _other shape to copy from
Expand All @@ -201,12 +189,8 @@ class IGNITION_PHYSICS_TPELIB_VISIBLE MeshShape : public Shape
/// \brief Constructor
public: MeshShape();

/// \brief Copy Constructor
/// \param[in] _other shape to copy from
public: MeshShape(const MeshShape &_other);

/// \brief Destructor
public: ~MeshShape() = default;
public: virtual ~MeshShape() = default;

/// \brief Assignment operator
/// \param[in] _other shape to copy from
Expand Down