Skip to content

Commit 0f53db5

Browse files
committed
simplify parameter-free lambdas
I just didn't know the syntax was allowed
1 parent 01d0cf9 commit 0f53db5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/test/test_move_to.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ TEST_F(PandaMoveTo, mapTarget) {
6262
}
6363

6464
TEST_F(PandaMoveTo, stateTarget) {
65-
move_to->setGoal([]() {
65+
move_to->setGoal([] {
6666
moveit_msgs::RobotState state;
6767
state.is_diff = true;
6868
state.joint_state.name = { "panda_joint1", "panda_joint2" };
@@ -110,7 +110,7 @@ moveit_msgs::AttachedCollisionObject createAttachedObject(const std::string& id)
110110
aco.object.header.frame_id = aco.link_name;
111111
aco.object.operation = aco.object.ADD;
112112
aco.object.id = id;
113-
aco.object.primitives.resize(1, []() {
113+
aco.object.primitives.resize(1, [] {
114114
shape_msgs::SolidPrimitive p;
115115
p.type = p.SPHERE;
116116
p.dimensions.resize(1);
@@ -128,7 +128,7 @@ moveit_msgs::AttachedCollisionObject createAttachedObject(const std::string& id)
128128
#if MOVEIT_HAS_STATE_RIGID_PARENT_LINK
129129
// If we don't have this, we also don't have subframe support
130130
aco.object.subframe_names.resize(1, "subframe");
131-
aco.object.subframe_poses.resize(1, []() {
131+
aco.object.subframe_poses.resize(1, [] {
132132
geometry_msgs::Pose p;
133133
p.orientation.w = 1.0;
134134
return p;

visualization/motion_planning_tasks/src/pluginlib_factory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class PluginlibFactory : public rviz::Factory
150150
}
151151
template <class Derived>
152152
void addBuiltInClass(const QString& name, const QString& description) {
153-
addBuiltInClass("Built Ins", name, description, []() { return new Derived(); });
153+
addBuiltInClass("Built Ins", name, description, [] { return new Derived(); });
154154
}
155155

156156
/** @brief Instantiate and return a instance of a subclass of Type using our

0 commit comments

Comments
 (0)