Skip to content

Commit

Permalink
clang-format-14
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Dec 22, 2024
1 parent cd0ab88 commit 4dfcf09
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
10 changes: 7 additions & 3 deletions core/include/moveit/task_constructor/stage_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@
#include <chrono>

// define pimpl() functions accessing correctly casted pimpl_ pointer
#define PIMPL_FUNCTIONS(Class) \
const Class##Private* Class::pimpl() const { return static_cast<const Class##Private*>(pimpl_); } \
Class##Private* Class::pimpl() { return static_cast<Class##Private*>(pimpl_); }
#define PIMPL_FUNCTIONS(Class) \
const Class##Private* Class::pimpl() const { \
return static_cast<const Class##Private*>(pimpl_); \
} \
Class##Private* Class::pimpl() { \
return static_cast<Class##Private*>(pimpl_); \
}

namespace moveit {
namespace task_constructor {
Expand Down
4 changes: 2 additions & 2 deletions core/src/cost_terms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const
auto& state_properties{ state->properties() };
auto& stage_properties{ s.creator()->properties() };
request.group_name = state_properties.hasProperty(group_property) ?
state_properties.get<std::string>(group_property) :
stage_properties.get<std::string>(group_property);
state_properties.get<std::string>(group_property) :
stage_properties.get<std::string>(group_property);

// look at all forbidden collisions involving group_name
request.enableGroup(state->scene()->getRobotModel());
Expand Down
2 changes: 1 addition & 1 deletion core/src/stages/compute_ik.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void ComputeIK::compute() {
if (value.empty()) { // property undefined
// determine IK link from eef/group
if (!(link = eef_jmg ? robot_model->getLinkModel(eef_jmg->getEndEffectorParentGroup().second) :
jmg->getOnlyOneEndEffectorTip())) {
jmg->getOnlyOneEndEffectorTip())) {
ROS_WARN_STREAM_NAMED("ComputeIK", "Failed to derive IK target link");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/stages/modify_planning_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void ModifyPlanningScene::attachObjects(planning_scene::PlanningScene& scene,
if (invert)
attach = !attach;
obj.object.operation = attach ? static_cast<int8_t>(moveit_msgs::CollisionObject::ADD) :
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
for (const std::string& name : pair.second.first) {
obj.object.id = name;
scene.processAttachedCollisionObjectMsg(obj);
Expand Down
2 changes: 1 addition & 1 deletion core/src/stages/simple_grasp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward) {
const std::string& eef = p.get<std::string>("eef");
moveit_msgs::AttachedCollisionObject obj;
obj.object.operation = forward ? static_cast<int8_t>(moveit_msgs::CollisionObject::ADD) :
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
obj.link_name = scene->getRobotModel()->getEndEffector(eef)->getEndEffectorParentGroup().second;
obj.object.id = p.get<std::string>("object");
scene->processAttachedCollisionObjectMsg(obj);
Expand Down
2 changes: 1 addition & 1 deletion core/test/test_stage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void attachObject(PlanningScene& scene, const std::string& object, const std::st
moveit_msgs::AttachedCollisionObject obj;
obj.link_name = link;
obj.object.operation = attach ? static_cast<int8_t>(moveit_msgs::CollisionObject::ADD) :
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
static_cast<int8_t>(moveit_msgs::CollisionObject::REMOVE);
obj.object.id = object;
scene.processAttachedCollisionObjectMsg(obj);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ScopedYamlEvent
{
public:
~ScopedYamlEvent() { yaml_event_delete(&event_); }
operator yaml_event_t const &() const { return event_; }
operator yaml_event_t const&() const { return event_; }
operator yaml_event_t&() { return event_; }

private:
Expand Down

0 comments on commit 4dfcf09

Please sign in to comment.