Skip to content

Commit

Permalink
A few uncrustify fixes for 0.78. (#667)
Browse files Browse the repository at this point in the history
Redo a couple lines of formatting to handle both 0.72
and 0.78, and disable formatting across our one very
large line.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Mar 3, 2024
1 parent 93030b5 commit 104747b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
8 changes: 4 additions & 4 deletions demo_nodes_cpp/src/services/add_two_ints_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class ServerNode final : public rclcpp::Node
explicit ServerNode(const rclcpp::NodeOptions & options)
: Node("add_two_ints_server", options)
{
auto handle_add_two_ints =
[this](const std::shared_ptr<rmw_request_id_t> request_header,
const std::shared_ptr<example_interfaces::srv::AddTwoInts::Request> request,
std::shared_ptr<example_interfaces::srv::AddTwoInts::Response> response) -> void
auto handle_add_two_ints = [this](
const std::shared_ptr<rmw_request_id_t> request_header,
const std::shared_ptr<example_interfaces::srv::AddTwoInts::Request> request,
std::shared_ptr<example_interfaces::srv::AddTwoInts::Response> response) -> void
{
(void)request_header;
RCLCPP_INFO(
Expand Down
8 changes: 4 additions & 4 deletions demo_nodes_cpp/src/services/introspection_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class IntrospectionServiceNode : public rclcpp::Node
explicit IntrospectionServiceNode(const rclcpp::NodeOptions & options)
: Node("introspection_service", options)
{
auto handle_add_two_ints =
[this](const std::shared_ptr<rmw_request_id_t> request_header,
const std::shared_ptr<example_interfaces::srv::AddTwoInts::Request> request,
std::shared_ptr<example_interfaces::srv::AddTwoInts::Response> response) -> void
auto handle_add_two_ints = [this](
const std::shared_ptr<rmw_request_id_t> request_header,
const std::shared_ptr<example_interfaces::srv::AddTwoInts::Request> request,
std::shared_ptr<example_interfaces::srv::AddTwoInts::Response> response) -> void
{
(void)request_header;
RCLCPP_INFO(
Expand Down
4 changes: 4 additions & 0 deletions image_tools/src/burger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ class Burger

// THE FOLLOWING IS A BURGER IN AN AWESOME C BASE64 MACRO. RESPECT IT

// *INDENT-OFF*

#define BURGER \
"iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AUYFx8cR++mBgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABCPSURBVHja7Vt3UFTX235YtrC7FCkioKyKBWNBo6Aw1iEYx5IYQwxGY4xoLAQdRUej/qyDYxRiA0siYyZGoyFBUYwaRQWCJhAMBHtBBAxIF5Zl2WV3n++Pb7jjBmyA/vy+5J05A/ecc0957nnPW9cCAPEPJhH+4fQvAP8C8A8n8UudTCyGTCZ7bDtJmEwm6PV6mEym/x8AeHp6YsiQIRg4cCBUKhWsrKxA8qkA6HQ6PHz4EEVFRcjLy8Pt27dx5coVlJaWtvoa2dqlZ8+ejIiIYE5ODquqqlhXV8fmksFgoE6nY01NDSsrK5mTk8OdO3dy2LBhrbJWi9bQA0QiEezs7DB58mSEhYXBw8NDaDMYDNDr9dDr9dBqtcjJyUFubi6Ki4tRXV2Nuro6kIRMJoO1tTUcHR3h4uIClUoFV1dXSCQSiMVioUgkEmFsjUaDXbt2YefOnbh//z7q6+ufe+0tBqBLly6YMmUKFixYAHt7e6H+1q1buHnzJtLS0pCeno6srKwnHl8XFxc4OTlBp9Ph7t27MBqNAAAbGxu4uLigS5cu8PT0hLe3N3r27IlevXqZ3ScxMTHYs2cP0tPTXx4LhISE8MaNG2ZHNjY2lhMnTmS3bt0e+16/fv24cuVK9uvXT6jr06cPL168yKNHj3Lz5s1CvUwm4+LFi7lkyRL6+PgQAF1dXRkQEMAvvviCDx48EOYuKirimjVrnncfzeAbCwtGR0eb8fa+ffvYuXNnWllZmfUVi8VmdQ4ODkxPT+eWLVsYHx9v1rdt27YcMWIEn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zZxgREcHx48ezXbt2rbZxe3t7BgYGMjo6mhcuXDCzRCsqKrht2zaOGjXqqSl0rZouL5PJ0LZtW8yfPx8hISFC9NVkMkGn00Gv1+Phw4fIyMhAdnY2cnJy8ODBAxQWFuLu3bvQ6XSPHdvR0RGDBg3C0KFD8eabb6Jr166QSCRmkiIjIwMRERE4deoUtFpts1LlWyVdvoEmT56MpUuXwsPDAzKZzCyvvymqr6/HvXv3UFpaivr6eiiVSjg7Owte50ep4fcGpaWliI2NxVdffYW7d++2Ti5RawHQQK+//jqGDx8Ob29vdOzYES4uLnB2dhbSbJ4lHF9eXo6ysjI8ePAA+fn5SEtLQ0pKCq5evdr6yVStDcCjZG9vLwDg4OAAZ2dnAQyZTCb8Pkij0aCyshKlpaWoqqpCRUUFSktLUVRUJCRnvLBsshcJwOOSrv6esmIymf5raTgvHYBXjf795ei/APzD6X8AnLiHel4uyPcAAAAASUVORK5CYII=" // NOLINT

// *INDENT-ON*

} // namespace burger

#endif // BURGER_HPP_
17 changes: 9 additions & 8 deletions lifecycle/src/lifecycle_service_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,11 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
{
rclcpp::WallRate time_between_state_changes(0.1); // 10s

using Transition = lifecycle_msgs::msg::Transition;

// configure
{
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_CONFIGURE)) {
if (!lc_client->change_state(Transition::TRANSITION_CONFIGURE)) {
return;
}
if (!lc_client->get_state()) {
Expand All @@ -219,7 +221,7 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
if (!rclcpp::ok()) {
return;
}
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_ACTIVATE)) {
if (!lc_client->change_state(Transition::TRANSITION_ACTIVATE)) {
return;
}
if (!lc_client->get_state()) {
Expand All @@ -233,7 +235,7 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
if (!rclcpp::ok()) {
return;
}
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_DEACTIVATE)) {
if (!lc_client->change_state(Transition::TRANSITION_DEACTIVATE)) {
return;
}
if (!lc_client->get_state()) {
Expand All @@ -247,7 +249,7 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
if (!rclcpp::ok()) {
return;
}
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_ACTIVATE)) {
if (!lc_client->change_state(Transition::TRANSITION_ACTIVATE)) {
return;
}
if (!lc_client->get_state()) {
Expand All @@ -261,7 +263,7 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
if (!rclcpp::ok()) {
return;
}
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_DEACTIVATE)) {
if (!lc_client->change_state(Transition::TRANSITION_DEACTIVATE)) {
return;
}
if (!lc_client->get_state()) {
Expand All @@ -275,7 +277,7 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
if (!rclcpp::ok()) {
return;
}
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_CLEANUP)) {
if (!lc_client->change_state(Transition::TRANSITION_CLEANUP)) {
return;
}
if (!lc_client->get_state()) {
Expand All @@ -292,8 +294,7 @@ callee_script(std::shared_ptr<LifecycleServiceClient> lc_client)
if (!rclcpp::ok()) {
return;
}
if (!lc_client->change_state(lifecycle_msgs::msg::Transition::TRANSITION_UNCONFIGURED_SHUTDOWN))
{
if (!lc_client->change_state(Transition::TRANSITION_UNCONFIGURED_SHUTDOWN)) {
return;
}
if (!lc_client->get_state()) {
Expand Down

0 comments on commit 104747b

Please sign in to comment.