Skip to content

Commit 297aef2

Browse files
author
Michael Carroll
authored
Clean up compiler warnings (#882)
* Remove unnecessary copies * Clean up unused variables Signed-off-by: Michael Carroll <michael@openrobotics.org>
1 parent 1acea10 commit 297aef2

4 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/Plugin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ sdf::ElementPtr Plugin::ToElement() const
151151
elem->GetAttribute("filename")->Set(this->Filename());
152152

153153
// Insert plugin content
154-
for (const sdf::ElementPtr content : this->dataPtr->contents)
154+
for (const sdf::ElementPtr &content : this->dataPtr->contents)
155155
elem->InsertElement(content, true);
156156

157157
return elem;
@@ -188,7 +188,7 @@ Plugin &Plugin::operator=(const Plugin &_plugin)
188188

189189
this->dataPtr->contents.clear();
190190
// Copy the contents of the plugin
191-
for (const sdf::ElementPtr content : _plugin.Contents())
191+
for (const sdf::ElementPtr &content : _plugin.Contents())
192192
{
193193
this->dataPtr->contents.push_back(content->Clone());
194194
}

src/parser_urdf.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2728,7 +2728,6 @@ void CreateLink(tinyxml2::XMLElement *_root,
27282728
elem->SetAttribute("name", _link->name.c_str());
27292729

27302730
// compute global transform
2731-
ignition::math::Pose3d localTransform;
27322731
// this is the transform from parent link to current _link
27332732
// this transform does not exist for the root link
27342733
if (_link->parent_joint)

test/integration/joint_dom.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,8 +978,6 @@ TEST(DOMJoint, Sensors)
978978
EXPECT_EQ("joint", joint->Name());
979979
EXPECT_EQ(1u, joint->SensorCount());
980980

981-
ignition::math::Pose3d pose;
982-
983981
// Get the force_torque sensor
984982
const sdf::Sensor *forceTorqueSensor =
985983
joint->SensorByName("force_torque_sensor");

usd/src/cmd/sdf2usd.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ void addFlags(CLI::App &_app)
270270
opt->outputFilename,
271271
"Output filename. Defaults to output.usd unless otherwise specified.");
272272

273-
_app.callback([&_app, opt](){
273+
_app.callback([opt](){
274274
runCommand(*opt);
275275
});
276276
}

0 commit comments

Comments
 (0)