From 5d0a2d0cc77085b60f4de42c4259f181b864d87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 14 Feb 2024 16:01:02 +0100 Subject: [PATCH] make linters happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- .../include/point_cloud_transport/raw_publisher.hpp | 11 ++++++----- .../point_cloud_transport/simple_publisher_plugin.hpp | 2 +- point_cloud_transport/src/publisher_plugin.cpp | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/point_cloud_transport/include/point_cloud_transport/raw_publisher.hpp b/point_cloud_transport/include/point_cloud_transport/raw_publisher.hpp index d903761..162d6f5 100644 --- a/point_cloud_transport/include/point_cloud_transport/raw_publisher.hpp +++ b/point_cloud_transport/include/point_cloud_transport/raw_publisher.hpp @@ -51,7 +51,7 @@ class RawPublisher public: virtual ~RawPublisher() {} - virtual std::string getTransportName() const override + std::string getTransportName() const override { return "raw"; } @@ -65,27 +65,28 @@ class RawPublisher { } - RawPublisher::TypedEncodeResult encodeTyped(const sensor_msgs::msg::PointCloud2 & raw) const override + RawPublisher::TypedEncodeResult encodeTyped(const sensor_msgs::msg::PointCloud2 & raw) const + override { return raw; } protected: - virtual void publish( + void publish( const sensor_msgs::msg::PointCloud2 & message, const PublishFn & publish_fn) const override { publish_fn(message); } - virtual void publish( + void publish( const sensor_msgs::msg::PointCloud2::ConstSharedPtr & message_ptr, const PublishFn & publish_fn) const override { publish_fn(*message_ptr); } - virtual std::string getTopicToAdvertise(const std::string & base_topic) const override + std::string getTopicToAdvertise(const std::string & base_topic) const override { return base_topic; } diff --git a/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp b/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp index 445b4bc..3d3531f 100644 --- a/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp +++ b/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp @@ -196,7 +196,7 @@ class SimplePublisherPlugin : public point_cloud_transport::PublisherPlugin protected: std::string base_topic_; - virtual void advertiseImpl( + void advertiseImpl( std::shared_ptr node, const std::string & base_topic, rmw_qos_profile_t custom_qos, const rclcpp::PublisherOptions & options) override diff --git a/point_cloud_transport/src/publisher_plugin.cpp b/point_cloud_transport/src/publisher_plugin.cpp index f6df1d7..d782c3d 100644 --- a/point_cloud_transport/src/publisher_plugin.cpp +++ b/point_cloud_transport/src/publisher_plugin.cpp @@ -53,7 +53,8 @@ void PublisherPlugin::advertise( advertiseImpl(node, base_topic, custom_qos, options); } -void PublisherPlugin::publishPtr(const sensor_msgs::msg::PointCloud2::ConstSharedPtr & message) const +void PublisherPlugin::publishPtr(const sensor_msgs::msg::PointCloud2::ConstSharedPtr & message) +const { publish(*message); }