|
48 | 48 |
|
49 | 49 | #include <limits>
|
50 | 50 | #include <memory>
|
| 51 | +#include <optional> |
51 | 52 | #include <string>
|
52 | 53 | #include <unordered_map>
|
53 | 54 | #include <vector>
|
54 |
| -#include <optional> |
55 | 55 |
|
56 | 56 | namespace autoware::test_utils
|
57 | 57 | {
|
@@ -451,7 +451,7 @@ template <typename T>
|
451 | 451 | void createSubscription(
|
452 | 452 | rclcpp::Node::SharedPtr test_node, const std::string & topic_name,
|
453 | 453 | std::function<void(const typename T::ConstSharedPtr)> callback,
|
454 |
| - std::shared_ptr<rclcpp::Subscription<T>> & subscriber, |
| 454 | + std::shared_ptr<rclcpp::Subscription<T>> & subscriber, |
455 | 455 | std::optional<rclcpp::QoS> qos = std::nullopt)
|
456 | 456 | {
|
457 | 457 | if (!qos.has_value()) {
|
@@ -483,7 +483,8 @@ void setSubscriber(
|
483 | 483 | std::optional<rclcpp::QoS> qos = std::nullopt)
|
484 | 484 | {
|
485 | 485 | createSubscription(
|
486 |
| - test_node, topic_name, [&count](const typename T::ConstSharedPtr) { count++; }, subscriber, qos); |
| 486 | + test_node, topic_name, [&count](const typename T::ConstSharedPtr) { count++; }, subscriber, |
| 487 | + qos); |
487 | 488 | }
|
488 | 489 |
|
489 | 490 | /**
|
@@ -568,7 +569,8 @@ class AutowareTestManager
|
568 | 569 | template <typename MessageType>
|
569 | 570 | void set_subscriber(
|
570 | 571 | const std::string & topic_name,
|
571 |
| - std::function<void(const typename MessageType::ConstSharedPtr)> callback, std::optional<rclcpp::QoS> qos = std::nullopt) |
| 572 | + std::function<void(const typename MessageType::ConstSharedPtr)> callback, |
| 573 | + std::optional<rclcpp::QoS> qos = std::nullopt) |
572 | 574 | {
|
573 | 575 | if (subscribers_.find(topic_name) == subscribers_.end()) {
|
574 | 576 | std::shared_ptr<rclcpp::Subscription<MessageType>> subscriber;
|
|
0 commit comments