Skip to content

Commit

Permalink
Remove unneeded sdf clone
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Apr 10, 2024
1 parent 6001861 commit 2028a54
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/systems/set_model_state/SetModelState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ void SetModelState::Configure(const Entity &_entity,
return;
}

auto sdfClone = _sdf->Clone();

auto modelStateElem = sdfClone->FindElement("model_state");
auto modelStateElem = _sdf->FindElement("model_state");
if (!modelStateElem)
{
gzerr << "No <model_state> specified; the model state is unchanged.\n";
Expand Down Expand Up @@ -113,7 +111,7 @@ void SetModelState::Configure(const Entity &_entity,
std::vector<double> jointVelocity;

auto parseScalarWithDegrees =
[](math::Angle &_scalar, sdf::ElementPtr _elem) -> bool
[](math::Angle &_scalar, sdf::ElementConstPtr _elem) -> bool
{
if (_elem)
{
Expand Down

0 comments on commit 2028a54

Please sign in to comment.