Skip to content

Commit 9d53987

Browse files
committed
satisfy clang-tidy & -Werror -Wall -Wextra
1 parent 924e733 commit 9d53987

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

core/include/moveit/task_constructor/cost_terms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class PathLength : public TrajectoryCostTerm
118118
public:
119119
PathLength() = default;
120120
PathLength(std::vector<std::string> j) : joints{ std::move(j) } {};
121-
double operator()(const SubTrajectory&, std::string&) const override;
121+
double operator()(const SubTrajectory& s, std::string& comment) const override;
122122

123123
std::vector<std::string> joints;
124124
};

core/test/test_serial.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ struct PredefinedCosts : CostTerm
3030
return cost_;
3131
}
3232

33-
double operator()(const SubTrajectory& s, std::string& comment) const override { return cost(); }
34-
double operator()(const SolutionSequence& s, std::string& comment) const override { return cost(); }
35-
double operator()(const WrappedSolution& s, std::string& comment) const override { return cost(); }
33+
double operator()(const SubTrajectory& /*s*/, std::string& /*comment*/) const override { return cost(); }
34+
double operator()(const SolutionSequence& /*s*/, std::string& /*comment*/) const override { return cost(); }
35+
double operator()(const WrappedSolution& /*s*/, std::string& /*comment*/) const override { return cost(); }
3636
};
3737

3838
/** Generator creating solutions with given costs */
@@ -197,9 +197,9 @@ TEST_F(Pruning, PropagatorFailure) {
197197
add(task, new ForwardMockup({ INF }));
198198

199199
EXPECT_FALSE(task.plan());
200-
ASSERT_EQ(task.solutions().size(), 0);
200+
ASSERT_EQ(task.solutions().size(), 0u);
201201
// ForwardMockup fails, so the backward stage should never compute
202-
EXPECT_EQ(back->calls_, 0);
202+
EXPECT_EQ(back->calls_, 0u);
203203
}
204204

205205
TEST_F(Pruning, PruningMultiForward) {
@@ -215,7 +215,7 @@ TEST_F(Pruning, PruningMultiForward) {
215215

216216
// the second (infeasible) solution in the last stage must not disable
217217
// the earlier partial solution just because they share stage solutions
218-
ASSERT_EQ(task.solutions().size(), 1);
218+
ASSERT_EQ(task.solutions().size(), 1u);
219219
EXPECT_EQ((*task.solutions().begin())->cost(), 0u);
220220
}
221221

@@ -273,7 +273,7 @@ TEST_F(Pruning, PropagateIntoContainer) {
273273

274274
// the failure in the backward stage (outside the container)
275275
// should prune the expected computation of con inside the container
276-
EXPECT_EQ(con->calls_, 0);
276+
EXPECT_EQ(con->calls_, 0u);
277277
}
278278

279279
TEST_F(Pruning, PropagateFromContainerPull) {
@@ -288,7 +288,7 @@ TEST_F(Pruning, PropagateFromContainerPull) {
288288
EXPECT_FALSE(task.plan());
289289

290290
// the failure inside the container should prune computing of back
291-
EXPECT_EQ(back->calls_, 0);
291+
EXPECT_EQ(back->calls_, 0u);
292292
}
293293

294294
TEST_F(Pruning, PropagateFromContainerPush) {
@@ -302,7 +302,7 @@ TEST_F(Pruning, PropagateFromContainerPush) {
302302
EXPECT_FALSE(task.plan());
303303

304304
// the failure inside container should prune computing of con
305-
EXPECT_EQ(con->calls_, 0);
305+
EXPECT_EQ(con->calls_, 0u);
306306
}
307307

308308
TEST_F(Pruning, PropagateFromParallelContainerMultiplePaths) {
@@ -318,5 +318,5 @@ TEST_F(Pruning, PropagateFromParallelContainerMultiplePaths) {
318318
EXPECT_TRUE(task.plan());
319319

320320
// the failure in one branch of Alternatives must not prune computing back
321-
EXPECT_EQ(back->calls_, 1);
321+
EXPECT_EQ(back->calls_, 1u);
322322
}

0 commit comments

Comments
 (0)