From adcc4ea05c58e6b3de8f52989affd40a961a3a8b Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Wed, 24 Jan 2024 21:20:13 +0900 Subject: [PATCH] apply reformat Signed-off-by: Masaya Kataoka --- include/vrx_bridge/vrx_bridge_component.hpp | 35 +++++++-------------- src/vrx_bridge_component.cpp | 12 +++---- src/vrx_bridge_node.cpp | 3 +- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/include/vrx_bridge/vrx_bridge_component.hpp b/include/vrx_bridge/vrx_bridge_component.hpp index c4573c7..5d1527e 100644 --- a/include/vrx_bridge/vrx_bridge_component.hpp +++ b/include/vrx_bridge/vrx_bridge_component.hpp @@ -23,35 +23,25 @@ extern "C" { // demos/composition/include/composition/visibility_control.h at https://github.com/ros2/demos #if defined _WIN32 || defined __CYGWIN__ #ifdef __GNUC__ -#define VRX_BRIDGE_COMPONENT_EXPORT \ - __attribute__((dllexport)) -#define VRX_BRIDGE_COMPONENT_IMPORT \ - __attribute__((dllimport)) +#define VRX_BRIDGE_COMPONENT_EXPORT __attribute__((dllexport)) +#define VRX_BRIDGE_COMPONENT_IMPORT __attribute__((dllimport)) #else -#define VRX_BRIDGE_COMPONENT_EXPORT \ - __declspec(dllexport) -#define VRX_BRIDGE_COMPONENT_IMPORT \ - __declspec(dllimport) +#define VRX_BRIDGE_COMPONENT_EXPORT __declspec(dllexport) +#define VRX_BRIDGE_COMPONENT_IMPORT __declspec(dllimport) #endif #ifdef VRX_BRIDGE_COMPONENT_BUILDING_DLL -#define VRX_BRIDGE_COMPONENT_PUBLIC \ - VRX_BRIDGE_COMPONENT_EXPORT +#define VRX_BRIDGE_COMPONENT_PUBLIC VRX_BRIDGE_COMPONENT_EXPORT #else -#define VRX_BRIDGE_COMPONENT_PUBLIC \ - VRX_BRIDGE_COMPONENT_IMPORT +#define VRX_BRIDGE_COMPONENT_PUBLIC VRX_BRIDGE_COMPONENT_IMPORT #endif -#define VRX_BRIDGE_COMPONENT_PUBLIC_TYPE \ - VRX_BRIDGE_COMPONENT_PUBLIC +#define VRX_BRIDGE_COMPONENT_PUBLIC_TYPE VRX_BRIDGE_COMPONENT_PUBLIC #define VRX_BRIDGE_COMPONENT_LOCAL #else -#define VRX_BRIDGE_COMPONENT_EXPORT \ - __attribute__((visibility("default"))) +#define VRX_BRIDGE_COMPONENT_EXPORT __attribute__((visibility("default"))) #define VRX_BRIDGE_COMPONENT_IMPORT #if __GNUC__ >= 4 -#define VRX_BRIDGE_COMPONENT_PUBLIC \ - __attribute__((visibility("default"))) -#define VRX_BRIDGE_COMPONENT_LOCAL \ - __attribute__((visibility("hidden"))) +#define VRX_BRIDGE_COMPONENT_PUBLIC __attribute__((visibility("default"))) +#define VRX_BRIDGE_COMPONENT_LOCAL __attribute__((visibility("hidden"))) #else #define VRX_BRIDGE_COMPONENT_PUBLIC #define VRX_BRIDGE_COMPONENT_LOCAL @@ -63,11 +53,10 @@ extern "C" { #endif #include -#include -#include #include #include - +#include +#include namespace vrx_bridge { diff --git a/src/vrx_bridge_component.cpp b/src/vrx_bridge_component.cpp index bbd162b..42dd6df 100644 --- a/src/vrx_bridge_component.cpp +++ b/src/vrx_bridge_component.cpp @@ -16,8 +16,7 @@ namespace vrx_bridge { -VRXBridgeComponent::VRXBridgeComponent( - const rclcpp::NodeOptions & options) +VRXBridgeComponent::VRXBridgeComponent(const rclcpp::NodeOptions & options) : Node("vrx_bridge", options) { gps_sub_ = this->create_subscription( @@ -37,8 +36,7 @@ VRXBridgeComponent::VRXBridgeComponent( goal_pub_ = this->create_publisher("/move_base_simple/goal", 1); } -void VRXBridgeComponent::GPStopic_callback( - const sensor_msgs::msg::NavSatFix::SharedPtr msg) +void VRXBridgeComponent::GPStopic_callback(const sensor_msgs::msg::NavSatFix::SharedPtr msg) { geographic_msgs::msg::GeoPoseStamped gps; gps.header = msg->header; @@ -49,8 +47,7 @@ void VRXBridgeComponent::GPStopic_callback( gps_pub_->publish(gps); } -void VRXBridgeComponent::Imutopic_callback( - const sensor_msgs::msg::Imu::SharedPtr msg) +void VRXBridgeComponent::Imutopic_callback(const sensor_msgs::msg::Imu::SharedPtr msg) { sensor_msgs::msg::Imu imu; imu.header = msg->header; @@ -59,8 +56,7 @@ void VRXBridgeComponent::Imutopic_callback( imu_pub_->publish(imu); } -void VRXBridgeComponent::Goaltopic_callback( - const geometry_msgs::msg::PoseStamped::SharedPtr msg) +void VRXBridgeComponent::Goaltopic_callback(const geometry_msgs::msg::PoseStamped::SharedPtr msg) { geometry_msgs::msg::PoseStamped goal; goal.header = msg->header; diff --git a/src/vrx_bridge_node.cpp b/src/vrx_bridge_node.cpp index b532ef0..299b420 100644 --- a/src/vrx_bridge_node.cpp +++ b/src/vrx_bridge_node.cpp @@ -20,8 +20,7 @@ int main(int argc, char * argv[]) { rclcpp::init(argc, argv); rclcpp::NodeOptions options; - auto component = - std::make_shared(options); + auto component = std::make_shared(options); rclcpp::spin(component); rclcpp::shutdown(); return 0;