Skip to content

Commit

Permalink
apply ament_clang_format version 16
Browse files Browse the repository at this point in the history
Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 committed Jan 17, 2025
1 parent 22f11aa commit 78a9ed6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ void toMsg(const rosgraph_msgs::Clock & proto, rosgraph_msgs::msg::Clock & time)
void toProto(const std_msgs::msg::Header & header, std_msgs::Header & proto);
void toMsg(const std_msgs::Header & proto, std_msgs::msg::Header & header);

#define DEFINE_CONVERSION(PACKAGE, TYPENAME) \
auto toProto(const PACKAGE::msg::TYPENAME &, PACKAGE::TYPENAME &)->void; \
auto toMsg(const PACKAGE::TYPENAME &, PACKAGE::msg::TYPENAME &)->void
#define DEFINE_CONVERSION(PACKAGE, TYPENAME) \
auto toProto(const PACKAGE::msg::TYPENAME &, PACKAGE::TYPENAME &) -> void; \
auto toMsg(const PACKAGE::TYPENAME &, PACKAGE::msg::TYPENAME &) -> void

DEFINE_CONVERSION(autoware_control_msgs, Lateral);
DEFINE_CONVERSION(autoware_control_msgs, Longitudinal);
Expand All @@ -190,8 +190,7 @@ auto toMsg(
{
using namespace simulation_api_schema;

auto convert_color = [](auto color) constexpr
{
auto convert_color = [](auto color) constexpr {
switch (color) {
case TrafficLight_Color_RED:
return TrafficLightBulbMessageType::RED;
Expand All @@ -206,8 +205,7 @@ auto toMsg(
}
};

auto convert_shape = [](auto shape) constexpr
{
auto convert_shape = [](auto shape) constexpr {
switch (shape) {
case TrafficLight_Shape_CIRCLE:
return TrafficLightBulbMessageType::CIRCLE;
Expand Down Expand Up @@ -235,8 +233,7 @@ auto toMsg(
}
};

auto convert_status = [](auto status) constexpr
{
auto convert_status = [](auto status) constexpr {
switch (status) {
case TrafficLight_Status_SOLID_OFF:
return TrafficLightBulbMessageType::SOLID_OFF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class BehaviorPluginBase
virtual auto update(const double current_time, const double step_time) -> void = 0;
virtual const std::string & getCurrentAction() const = 0;

#define DEFINE_GETTER_SETTER(NAME, KEY, TYPE) \
virtual TYPE get##NAME() = 0; \
virtual void set##NAME(const TYPE & value) = 0; \
auto get##NAME##Key() const->const std::string & \
{ \
static const std::string key = KEY; \
return key; \
#define DEFINE_GETTER_SETTER(NAME, KEY, TYPE) \
virtual TYPE get##NAME() = 0; \
virtual void set##NAME(const TYPE & value) = 0; \
auto get##NAME##Key() const -> const std::string & \
{ \
static const std::string key = KEY; \
return key; \
}

// clang-format off
Expand Down

0 comments on commit 78a9ed6

Please sign in to comment.