From f24c3414ec053858de054de1f30d390ac6d7e4a5 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 10 Jan 2024 10:08:35 +0000 Subject: [PATCH] Remove unnecessary std::string() Co-authored-by: Sai Kishor Kothakota --- hardware_interface/src/component_parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware_interface/src/component_parser.cpp b/hardware_interface/src/component_parser.cpp index d7ac3a56139..0841265e811 100644 --- a/hardware_interface/src/component_parser.cpp +++ b/hardware_interface/src/component_parser.cpp @@ -655,7 +655,7 @@ std::vector parse_control_resources_from_urdf(const std::string & if (mimicked_joint_it == hw_info.joints.cend()) { throw std::runtime_error( - std::string("Mimicked joint '") + joint.parameters.at("mimic") + "' not found"); + "Mimicked joint '" + joint.parameters.at("mimic") + "' not found"); } hardware_interface::MimicJoint mimic_joint; mimic_joint.joint_index = i; @@ -684,15 +684,15 @@ std::vector parse_control_resources_from_urdf(const std::string & if (!urdf_joint->mimic && joint.is_mimic == MimicAttribute::TRUE) { throw std::runtime_error( - "Joint '" + std::string(joint.name) + "' has no mimic information in the URDF."); + "Joint '" + joint.name + "' has no mimic information in the URDF."); } if (urdf_joint->mimic && joint.is_mimic != MimicAttribute::FALSE) { if (joint.command_interfaces.size() > 0) { throw std::runtime_error( - "Joint '" + std::string(joint.name) + - "' has mimic attribute not set to false: Mimic joints cannot have command " + "Joint '" + joint.name + + "' has mimic attribute not set to false: Activated mimic joints cannot have command " "interfaces."); } auto find_joint = [&hw_info](const std::string & name)