Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Sep 3, 2020
1 parent d2a9481 commit 694720c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions tpe/lib/src/Model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ using namespace physics;
using namespace tpelib;

//////////////////////////////////////////////////
Model::Model() : Entity()
: dataPtr(new ModelPrivate)
Model::Model()
: Entity(), dataPtr(new ModelPrivate)
{
}

//////////////////////////////////////////////////
Model::Model(std::size_t _id) : Entity(_id)
: dataPtr(new ModelPrivate)
Model::Model(std::size_t _id)
: Entity(_id), dataPtr(new ModelPrivate)
{
}

Expand All @@ -62,7 +62,7 @@ Entity &Model::AddLink()
std::size_t linkId = Entity::GetNextId();

// first link added is the canonical link
if (this->children.empty())
if (this->GetChildren().empty())
this->dataPtr->canonicalLinkId = linkId;

const auto[it, success] = this->GetChildren().insert(
Expand Down Expand Up @@ -90,8 +90,8 @@ Entity &Model::GetCanonicalLink()
{
// return canonical link but make sure it exists
// todo(anyone) Prevent removal of canonical link in a model?
Entity linkEnt = this->GetChildById(this->dataPtr->canonicalLinkId);
if (linkEnt != kNullEntity)
Entity &linkEnt = this->GetChildById(this->dataPtr->canonicalLinkId);
if (linkEnt.GetId() != kNullEntityId)
return linkEnt;

std::set<Model *> models;
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() = default;
public: ~Model();

/// \brief Add a link
/// \return Newly created Link
Expand Down

0 comments on commit 694720c

Please sign in to comment.