From 2028a5489de549ce5ef2e9fd60a4a294a55d0dc2 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 9 Apr 2024 17:39:23 -0700 Subject: [PATCH] Remove unneeded sdf clone Signed-off-by: Steve Peters --- src/systems/set_model_state/SetModelState.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/systems/set_model_state/SetModelState.cc b/src/systems/set_model_state/SetModelState.cc index 5a8a25817c..1451cd992a 100644 --- a/src/systems/set_model_state/SetModelState.cc +++ b/src/systems/set_model_state/SetModelState.cc @@ -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 specified; the model state is unchanged.\n"; @@ -113,7 +111,7 @@ void SetModelState::Configure(const Entity &_entity, std::vector jointVelocity; auto parseScalarWithDegrees = - [](math::Angle &_scalar, sdf::ElementPtr _elem) -> bool + [](math::Angle &_scalar, sdf::ElementConstPtr _elem) -> bool { if (_elem) {