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

Add virtual destructors to Properties in Entity and [Soft]BodyNode #458

Merged
merged 1 commit into from
Jul 19, 2015
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: 4 additions & 0 deletions dart/dynamics/BodyNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ class BodyNode : public Frame, public SkeletonRefCountingBase
double _restitutionCoeff = DART_DEFAULT_RESTITUTION_COEFF,
bool _gravityMode = true);

virtual ~UniqueProperties() = default;

// To get byte-aligned Eigen vectors
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
Expand All @@ -135,6 +137,8 @@ class BodyNode : public Frame, public SkeletonRefCountingBase
Properties(
const Entity::Properties& _entityProperties = Entity::Properties("BodyNode"),
const UniqueProperties& _bodyNodeProperties = UniqueProperties());

virtual ~Properties() = default;
};

/// Destructor
Expand Down
2 changes: 2 additions & 0 deletions dart/dynamics/Entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class Entity : public virtual common::Subject
/// Constructor
Properties(const std::string& _name = "",
const std::vector<ShapePtr>& _vizShapes=std::vector<ShapePtr>());

virtual ~Properties() = default;
};

/// Constructor for typical usage
Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/SoftBodyNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ class SoftBodyNode : public BodyNode
const std::vector<Eigen::Vector3i>& _faces =
std::vector<Eigen::Vector3i>());

virtual ~UniqueProperties() = default;

/// Add a PointMass to this Properties struct
void addPointMass(const PointMass::Properties& _properties);

Expand All @@ -112,6 +114,8 @@ class SoftBodyNode : public BodyNode
const BodyNode::Properties& _bodyProperties = BodyNode::Properties(),
const SoftBodyNode::UniqueProperties& _softProperties =
SoftBodyNode::UniqueProperties());

virtual ~Properties() = default;
};

/// \brief
Expand Down