Skip to content

Commit fa041ed

Browse files
committed
clang-format: readability-container-size-empty
1 parent b762079 commit fa041ed

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Checks: '-*,
55
modernize-use-using,
66
modernize-loop-convert,
77
readability-named-parameter,
8+
readability-container-size-empty,
89
'
910
HeaderFilterRegex: '.*/moveit/task_constructor/.*\.h'
1011
AnalyzeTemporaryDtors: false

capabilities/src/execute_task_solution_capability.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr
151151
std::vector<std::string> joint_names(sub_traj.trajectory.joint_trajectory.joint_names);
152152
joint_names.insert(joint_names.end(), sub_traj.trajectory.multi_dof_joint_trajectory.joint_names.begin(),
153153
sub_traj.trajectory.multi_dof_joint_trajectory.joint_names.end());
154-
if (joint_names.size()) {
154+
if (!joint_names.empty()) {
155155
group = findJointModelGroup(*model, joint_names);
156156
if (!group) {
157157
ROS_ERROR_STREAM_NAMED("ExecuteTaskSolution", "Could not find JointModelGroup that actuates {"

core/src/stages/fixed_cartesian_poses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void FixedCartesianPoses::onNewSolution(const SolutionBase& s) {
7070
}
7171

7272
bool FixedCartesianPoses::canCompute() const {
73-
return upstream_solutions_.size() > 0;
73+
return !upstream_solutions_.empty();
7474
}
7575

7676
void FixedCartesianPoses::compute() {

core/src/stages/generate_pose.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void GeneratePose::onNewSolution(const SolutionBase& s) {
6060
}
6161

6262
bool GeneratePose::canCompute() const {
63-
return upstream_solutions_.size() > 0;
63+
return !upstream_solutions_.empty();
6464
}
6565

6666
void GeneratePose::compute() {

visualization/visualization_tools/src/display_solution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void DisplaySolution::setFromMessage(const planning_scene::PlanningScenePtr& sta
118118
// create new reference scene for next iteration
119119
ref_scene = ref_scene->diff();
120120

121-
if (sub.info.markers.size())
121+
if (!sub.info.markers.empty())
122122
data_[i].markers_.reset(new MarkerVisualization(sub.info.markers, *ref_scene));
123123
else
124124
data_[i].markers_.reset();

0 commit comments

Comments
 (0)