Skip to content

Commit

Permalink
Merge acae87b into 8ee8028
Browse files Browse the repository at this point in the history
  • Loading branch information
shameekganguly authored Jun 7, 2023
2 parents 8ee8028 + acae87b commit d30ba3f
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/CompositeData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <cassert>
#include <utility>

#include "gz/physics/CompositeData.hh"

Expand Down Expand Up @@ -129,7 +130,7 @@ namespace gz
if (!_receiver->second.data)
++_numEntries;

_receiver->second.data.reset(_sender->second.data.release());
_receiver->second.data = std::move(_sender->second.data);
_receiver->second.required =
_mergeRequirements && _sender->second.required;
}
Expand Down
2 changes: 1 addition & 1 deletion src/TestUtilities.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace test
};
}

void PrimeTheLoader(plugin::Loader &_loader)
inline void PrimeTheLoader(plugin::Loader &_loader)
{
for (const std::string &library
: physics::test::g_PhysicsPluginLibraries)
Expand Down
6 changes: 3 additions & 3 deletions tpe/lib/src/Entity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Entity &Entity::GetChildById(std::size_t _id) const
auto it = this->dataPtr->children.find(_id);
if (it != this->dataPtr->children.end())
{
return *it->second.get();
return *it->second;
}

return kNullEntity;
Expand All @@ -195,7 +195,7 @@ Entity &Entity::GetChildByName(const std::string &_name) const
{
if (it->second->GetName() == _name)
{
return *it->second.get();
return *it->second;
}
}

Expand All @@ -212,7 +212,7 @@ Entity &Entity::GetChildByIndex(unsigned int _index) const
std::advance(it, _index);
if (it != this->dataPtr->children.end())
{
return *it->second.get();
return *it->second;
}

return kNullEntity;
Expand Down
4 changes: 2 additions & 2 deletions tpe/lib/src/Entity.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class GZ_PHYSICS_TPELIB_VISIBLE Entity
public: Entity(const Entity &_other);

/// \brief Move constructor
/// \param[in] _entity Other entity to move from
public: Entity(Entity &&_entity) noexcept;
/// \param[in] _other Other entity to move from
public: Entity(Entity &&_other) noexcept;

/// \brief Move assignment operator
/// \param[in] _entity Entity to move
Expand Down
2 changes: 1 addition & 1 deletion tpe/lib/src/Link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Entity &Link::AddCollision()
{collisionId, std::make_shared<Collision>(collisionId)});
it->second->SetParent(this);
this->ChildrenChanged();
return *it->second.get();
return *it->second;
}

//////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions tpe/lib/src/Model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Entity &Model::AddLink()

it->second->SetParent(this);
this->ChildrenChanged();
return *it->second.get();
return *it->second;
}

//////////////////////////////////////////////////
Expand All @@ -101,7 +101,7 @@ Entity &Model::AddModel()

it->second->SetParent(this);
this->ChildrenChanged();
return *it->second.get();
return *it->second;
}

//////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion tpe/lib/src/World.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Entity &World::AddModel()
std::size_t modelId = Entity::GetNextId();
const auto[it, success] = this->GetChildren().insert(
{modelId, std::make_shared<Model>(modelId)});
return *it->second.get();
return *it->second;
}

/////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion tpe/plugin/src/EntityManagementFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ Identity EntityManagementFeatures::ConstructEmptyLink(

/////////////////////////////////////////////////
void EntityManagementFeatures::SetCollisionFilterMask(
const Identity &_shapeID, const uint16_t _mask)
const Identity &_shapeID, uint16_t _mask)
{
auto collision =
this->ReferenceInterface<CollisionInfo>(_shapeID)->collision;
Expand Down
2 changes: 1 addition & 1 deletion tpe/plugin/src/EntityManagementFeatures.hh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class EntityManagementFeatures :

// ----- Manage collision filter masks -----
public: void SetCollisionFilterMask(
const Identity &_shapeID, const uint16_t _mask) override;
const Identity &_shapeID, uint16_t _mask) override;

public: uint16_t GetCollisionFilterMask(
const Identity &_shapeID) const override;
Expand Down
4 changes: 2 additions & 2 deletions tpe/plugin/src/SDFFeatures.hh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SDFFeatures :
const ::sdf::Model &_sdfModel) override;

public: Identity ConstructSdfNestedModel(
const Identity &_modelID,
const Identity &_parentID,
const ::sdf::Model &_sdfModel) override;

public: Identity ConstructSdfLink(
Expand All @@ -62,7 +62,7 @@ class SDFFeatures :

private: Identity ConstructSdfCollision(
const Identity &_linkID,
const ::sdf::Collision &_collision) override;
const ::sdf::Collision &_sdfCollision) override;
};

}
Expand Down
2 changes: 1 addition & 1 deletion tpe/plugin/src/ShapeFeatures.hh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ShapeFeatures :
const Identity &_linkID,
const std::string &_name,
double _radius,
double _height,
double _length,
const Pose3d &_pose) override;

// ----- Cylinder Features -----
Expand Down

0 comments on commit d30ba3f

Please sign in to comment.