Skip to content

Commit 1e7dc3d

Browse files
committed
update to clang-format-14
1 parent b257ffe commit 1e7dc3d

File tree

9 files changed

+17
-13
lines changed

9 files changed

+17
-13
lines changed

.github/workflows/format.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
submodules: recursive
19-
- name: Install clang-format-12
20-
run: sudo apt-get install clang-format-12
19+
- name: Install clang-format-14
20+
run: sudo apt-get install clang-format-14
2121
- uses: pre-commit/[email protected]
2222
id: precommit
2323
- name: Upload pre-commit changes

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
- id: clang-format
4040
name: clang-format
4141
description: Format files with ClangFormat.
42-
entry: clang-format-12
42+
entry: clang-format-14
4343
language: system
4444
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
4545
args: ["-fallback-style=none", "-i"]

core/include/moveit/task_constructor/stage_p.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@
5050
#include <chrono>
5151

5252
// define pimpl() functions accessing correctly casted pimpl_ pointer
53-
#define PIMPL_FUNCTIONS(Class) \
54-
const Class##Private* Class::pimpl() const { return static_cast<const Class##Private*>(pimpl_); } \
55-
Class##Private* Class::pimpl() { return static_cast<Class##Private*>(pimpl_); }
53+
#define PIMPL_FUNCTIONS(Class) \
54+
const Class##Private* Class::pimpl() const { \
55+
return static_cast<const Class##Private*>(pimpl_); \
56+
} \
57+
Class##Private* Class::pimpl() { \
58+
return static_cast<Class##Private*>(pimpl_); \
59+
}
5660

5761
namespace moveit {
5862
namespace task_constructor {

core/src/cost_terms.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const
242242
auto& state_properties{ state->properties() };
243243
auto& stage_properties{ s.creator()->properties() };
244244
request.group_name = state_properties.hasProperty(group_property) ?
245-
state_properties.get<std::string>(group_property) :
246-
stage_properties.get<std::string>(group_property);
245+
state_properties.get<std::string>(group_property) :
246+
stage_properties.get<std::string>(group_property);
247247

248248
// look at all forbidden collisions involving group_name
249249
request.enableGroup(state->scene()->getRobotModel());

core/src/stages/compute_ik.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void ComputeIK::compute() {
295295
if (value.empty()) { // property undefined
296296
// determine IK link from eef/group
297297
if (!(link = eef_jmg ? robot_model->getLinkModel(eef_jmg->getEndEffectorParentGroup().second) :
298-
jmg->getOnlyOneEndEffectorTip())) {
298+
jmg->getOnlyOneEndEffectorTip())) {
299299
RCLCPP_WARN_STREAM(LOGGER, "Failed to derive IK target link");
300300
return;
301301
}

core/src/stages/modify_planning_scene.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void ModifyPlanningScene::attachObjects(planning_scene::PlanningScene& scene,
105105
if (invert)
106106
attach = !attach;
107107
obj.object.operation = attach ? static_cast<int8_t>(moveit_msgs::msg::CollisionObject::ADD) :
108-
static_cast<int8_t>(moveit_msgs::msg::CollisionObject::REMOVE);
108+
static_cast<int8_t>(moveit_msgs::msg::CollisionObject::REMOVE);
109109
for (const std::string& name : pair.second.first) {
110110
obj.object.id = name;
111111
scene.processAttachedCollisionObjectMsg(obj);

core/src/stages/simple_grasp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward) {
133133
const std::string& eef = p.get<std::string>("eef");
134134
moveit_msgs::msg::AttachedCollisionObject obj;
135135
obj.object.operation = forward ? static_cast<int8_t>(moveit_msgs::msg::CollisionObject::ADD) :
136-
static_cast<int8_t>(moveit_msgs::msg::CollisionObject::REMOVE);
136+
static_cast<int8_t>(moveit_msgs::msg::CollisionObject::REMOVE);
137137
obj.link_name = scene->getRobotModel()->getEndEffector(eef)->getEndEffectorParentGroup().second;
138138
obj.object.id = p.get<std::string>("object");
139139
scene->processAttachedCollisionObjectMsg(obj);

core/test/test_stage.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void attachObject(PlanningScene& scene, const std::string& object, const std::st
121121
moveit_msgs::msg::AttachedCollisionObject obj;
122122
obj.link_name = link;
123123
obj.object.operation = attach ? static_cast<int8_t>(moveit_msgs::msg::CollisionObject::ADD) :
124-
static_cast<int8_t>(moveit_msgs::msg::CollisionObject::REMOVE);
124+
static_cast<int8_t>(moveit_msgs::msg::CollisionObject::REMOVE);
125125
obj.object.id = object;
126126
scene.processAttachedCollisionObjectMsg(obj);
127127
}

visualization/motion_planning_tasks/properties/property_from_yaml.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ScopedYamlEvent
5353
{
5454
public:
5555
~ScopedYamlEvent() { yaml_event_delete(&event_); }
56-
operator yaml_event_t const &() const { return event_; }
56+
operator yaml_event_t const&() const { return event_; }
5757
operator yaml_event_t&() { return event_; }
5858

5959
private:

0 commit comments

Comments
 (0)