Skip to content

Commit b762079

Browse files
committed
clang-tidy: readability-named-parameters
1 parent 5da2df4 commit b762079

File tree

10 files changed

+19
-13
lines changed

10 files changed

+19
-13
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Checks: '-*,
44
modernize-use-override,
55
modernize-use-using,
66
modernize-loop-convert,
7+
readability-named-parameter,
78
'
89
HeaderFilterRegex: '.*/moveit/task_constructor/.*\.h'
910
AnalyzeTemporaryDtors: false

capabilities/src/execute_task_solution_capability.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr
166166
exec_traj.trajectory_->setRobotTrajectoryMsg(state, sub_traj.trajectory);
167167

168168
/* TODO add action feedback and markers */
169-
exec_traj.effect_on_success_ = [this, sub_traj, description](const plan_execution::ExecutableMotionPlan*) {
169+
exec_traj.effect_on_success_ = [this, sub_traj,
170+
description](const plan_execution::ExecutableMotionPlan* /*plan*/) {
170171
#if MOVEIT_MASTER
171172
if (!moveit::core::isEmpty(sub_traj.scene_diff)) {
172173
#else

core/include/moveit/task_constructor/properties.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ class PropertySerializerBase
194194
using SerializeFunction = std::string (*)(const boost::any&);
195195
using DeserializeFunction = boost::any (*)(const std::string&);
196196

197-
static std::string dummySerialize(const boost::any&) { return ""; }
198-
static boost::any dummyDeserialize(const std::string&) { return boost::any(); }
197+
static std::string dummySerialize(const boost::any& /*unused*/) { return ""; }
198+
static boost::any dummyDeserialize(const std::string& /*unused*/) { return boost::any(); }
199199

200200
protected:
201201
static bool insert(const std::type_index& type_index, const std::string& type_name, SerializeFunction serialize,

core/include/moveit/task_constructor/stages/move_to.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class MoveTo : public PropagatingEitherWay
104104
decltype(std::declval<SolutionBase>().markers()) & markers);
105105
bool getPointGoal(const boost::any& goal, const moveit::core::LinkModel* link,
106106
const planning_scene::PlanningScenePtr& scene, Eigen::Isometry3d& target_eigen,
107-
decltype(std::declval<SolutionBase>().markers()) &);
107+
decltype(std::declval<SolutionBase>().markers()) & /*unused*/);
108108

109109
protected:
110110
solvers::PlannerInterfacePtr planner_;

core/src/introspection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void Introspection::fillStageStatistics(const Stage& stage, moveit_task_construc
204204

205205
moveit_task_constructor_msgs::TaskDescription&
206206
Introspection::fillTaskDescription(moveit_task_constructor_msgs::TaskDescription& msg) {
207-
ContainerBase::StageCallback stageProcessor = [this, &msg](const Stage& stage, unsigned int) -> bool {
207+
ContainerBase::StageCallback stageProcessor = [this, &msg](const Stage& stage, unsigned int /*depth*/) -> bool {
208208
// this method is called for each child stage of a given parent
209209
moveit_task_constructor_msgs::StageDescription desc;
210210
desc.id = stageId(&stage);
@@ -240,7 +240,7 @@ Introspection::fillTaskDescription(moveit_task_constructor_msgs::TaskDescription
240240

241241
moveit_task_constructor_msgs::TaskStatistics&
242242
Introspection::fillTaskStatistics(moveit_task_constructor_msgs::TaskStatistics& msg) {
243-
ContainerBase::StageCallback stageProcessor = [this, &msg](const Stage& stage, unsigned int) -> bool {
243+
ContainerBase::StageCallback stageProcessor = [this, &msg](const Stage& stage, unsigned int /*depth*/) -> bool {
244244
// this method is called for each child stage of a given parent
245245
moveit_task_constructor_msgs::StageStatistics stat; // create new Stage msg
246246
stat.id = stageId(&stage);

core/src/stages/move_to.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ bool MoveTo::getPoseGoal(const boost::any& goal, const geometry_msgs::PoseStampe
147147

148148
bool MoveTo::getPointGoal(const boost::any& goal, const moveit::core::LinkModel* link,
149149
const planning_scene::PlanningScenePtr& scene, Eigen::Isometry3d& target_eigen,
150-
decltype(std::declval<SolutionBase>().markers()) &) {
150+
decltype(std::declval<SolutionBase>().markers()) & /*unused*/) {
151151
try {
152152
const geometry_msgs::PointStamped& target = boost::any_cast<geometry_msgs::PointStamped>(goal);
153153
Eigen::Vector3d target_point;
@@ -160,6 +160,8 @@ bool MoveTo::getPointGoal(const boost::any& goal, const moveit::core::LinkModel*
160160
// retain link orientation
161161
target_eigen = scene->getCurrentState().getGlobalLinkTransform(link);
162162
target_eigen.translation() = target_point;
163+
164+
// TODO: add marker visualization
163165
} catch (const boost::bad_any_cast&) {
164166
return false;
165167
}

core/src/task.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void Task::enableIntrospection(bool enable) {
219219
// reset introspection instance of all stages
220220
pimpl()->setIntrospection(nullptr);
221221
pimpl()->traverseStages(
222-
[](Stage& stage, int) {
222+
[](Stage& stage, int /*depth*/) {
223223
stage.pimpl()->setIntrospection(nullptr);
224224
return true;
225225
},
@@ -271,7 +271,7 @@ void Task::init() {
271271
// provide introspection instance to all stages
272272
impl->setIntrospection(impl->introspection_.get());
273273
impl->traverseStages(
274-
[impl](Stage& stage, int) {
274+
[impl](Stage& stage, int /*depth*/) {
275275
stage.pimpl()->setIntrospection(impl->introspection_.get());
276276
return true;
277277
},

core/test/test_container.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MonitoringGeneratorMockup : public MonitoringGenerator
3333
: MonitoringGenerator("monitoring generator " + std::to_string(++mock_id), monitored) {}
3434
bool canCompute() const override { return false; }
3535
void compute() override {}
36-
void onNewSolution(const SolutionBase&) override {}
36+
void onNewSolution(const SolutionBase& /*solution*/) override {}
3737
};
3838

3939
class PropagatorMockup : public PropagatingEitherWay

visualization/motion_planning_tasks/properties/property_factory.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ namespace mtc = ::moveit::task_constructor;
4949
namespace moveit_rviz_plugin {
5050

5151
static rviz::StringProperty* stringFactory(const QString& name, mtc::Property& mtc_prop,
52-
const planning_scene::PlanningScene*, rviz::DisplayContext*) {
52+
const planning_scene::PlanningScene* /*unused*/,
53+
rviz::DisplayContext* /*unused*/) {
5354
std::string value;
5455
if (!mtc_prop.value().empty())
5556
value = boost::any_cast<std::string>(mtc_prop.value());
@@ -61,7 +62,8 @@ static rviz::StringProperty* stringFactory(const QString& name, mtc::Property& m
6162
}
6263
template <typename T>
6364
static rviz::FloatProperty* floatFactory(const QString& name, mtc::Property& mtc_prop,
64-
const planning_scene::PlanningScene*, rviz::DisplayContext*) {
65+
const planning_scene::PlanningScene* /*unused*/,
66+
rviz::DisplayContext* /*unused*/) {
6567
T value = !mtc_prop.value().empty() ? boost::any_cast<T>(mtc_prop.value()) : T();
6668
rviz::FloatProperty* rviz_prop =
6769
new rviz::FloatProperty(name, value, QString::fromStdString(mtc_prop.description()));

visualization/visualization_tools/include/moveit/visualization_tools/task_solution_visualization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public Q_SLOTS:
119119
void interruptCurrentDisplay();
120120

121121
private Q_SLOTS:
122-
void onAllAtOnceChanged(bool);
122+
void onAllAtOnceChanged(bool all_at_once);
123123

124124
// trajectory property slots
125125
void changedRobotVisualEnabled();

0 commit comments

Comments
 (0)