Skip to content

Commit 0902d43

Browse files
committed
Improve code readability
1 parent a86bb42 commit 0902d43

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

core/src/container.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ void SerialContainerPrivate::resolveInterface(InterfaceFlags expected) {
473473
exceptions.append(e);
474474
}
475475

476-
required_interface_ = first.pimpl()->interfaceFlags() & START_IF_MASK | last.pimpl()->interfaceFlags() & END_IF_MASK;
476+
required_interface_ = (first.pimpl()->interfaceFlags() & START_IF_MASK) | // clang-format off
477+
(last.pimpl()->interfaceFlags() & END_IF_MASK); // clang-format off
477478

478479
if (exceptions)
479480
throw exceptions;

core/src/merge.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ moveit::core::JointModelGroup* merge(const std::vector<const moveit::core::Joint
9191
if (joints.size() != sum_joints) { // overlapping joint groups: analyse in more detail
9292
auto duplicates = findDuplicates(groups, joints);
9393
if (!duplicates.empty()) {
94-
std::string message(
95-
"overlapping joints: " +
96-
boost::algorithm::join(duplicates | boost::adaptors::transformed([](auto&& j) { return j->getName(); }),
97-
", "));
94+
auto getJointName = boost::adaptors::transformed([](auto&& jm) { return jm->getName(); });
95+
std::string message("overlapping joints: " + boost::algorithm::join(duplicates | getJointName, ", "));
9896
throw std::runtime_error(message);
9997
}
10098
}

0 commit comments

Comments
 (0)