|
1 | | -diff --git a/include/foxglove_bridge/generic_client.hpp b/include/foxglove_bridge/generic_client.hpp |
2 | | -index 9478fae..ff1f017 100644 |
3 | | ---- a/include/foxglove_bridge/generic_client.hpp |
4 | | -+++ b/include/foxglove_bridge/generic_client.hpp |
5 | | -@@ -23,7 +23,7 @@ public: |
6 | | - |
7 | | - std::shared_ptr<void> create_response() override; |
8 | | - std::shared_ptr<rmw_request_id_t> create_request_header() override; |
9 | | --#if RCLCPP_VERSION_GTE(31, 0, 0) |
10 | | -+#if (RCLCPP_VERSION_MAJOR > 31 || (RCLCPP_VERSION_MAJOR == 31 && (RCLCPP_VERSION_MINOR > 0 || (RCLCPP_VERSION_MINOR == 0 && RCLCPP_VERSION_PATCH >= 0)))) |
11 | | - void handle_response(const std::shared_ptr<rmw_request_id_t>& request_header, |
12 | | - const std::shared_ptr<void>& response) override; |
13 | | - #else |
14 | | -diff --git a/src/generic_client.cpp b/src/generic_client.cpp |
15 | | -index 51ed180..a78c3c1 100644 |
16 | | ---- a/src/generic_client.cpp |
17 | | -+++ b/src/generic_client.cpp |
18 | | -@@ -70,7 +70,7 @@ std::string getTypeIntrospectionSymbolName(const std::string& serviceType) { |
19 | | - |
20 | | - const rosidl_service_type_support_t* GenericClient::getServiceTypeSupportHandle( |
21 | | - const std::string& serviceType) { |
22 | | --#if RCLCPP_VERSION_GTE(25, 0, 0) |
23 | | -+#if (RCLCPP_VERSION_MAJOR > 25 || (RCLCPP_VERSION_MAJOR == 25 && (RCLCPP_VERSION_MINOR > 0 || (RCLCPP_VERSION_MINOR == 0 && RCLCPP_VERSION_PATCH >= 0)))) |
24 | | - // Jazzy and newer can use the built-in rclcpp call. |
25 | | - return rclcpp::get_service_typesupport_handle(serviceType, TYPESUPPORT_LIB_NAME, |
26 | | - *_typeSupportLib); |
27 | | -@@ -120,7 +120,7 @@ GenericClient::GenericClient(rclcpp::node_interfaces::NodeBaseInterface* nodeBas |
28 | | - |
29 | | - // get_typesupport_handle is deprecated since rclcpp 25.0.0 |
30 | | - // (https://github.com/ros2/rclcpp/pull/2209) |
31 | | --#if RCLCPP_VERSION_GTE(25, 0, 0) |
32 | | -+#if (RCLCPP_VERSION_MAJOR > 25 || (RCLCPP_VERSION_MAJOR == 25 && (RCLCPP_VERSION_MINOR > 0 || (RCLCPP_VERSION_MINOR == 0 && RCLCPP_VERSION_PATCH >= 0)))) |
33 | | - _requestTypeSupportHdl = |
34 | | - rclcpp::get_message_typesupport_handle(requestTypeName, TYPESUPPORT_LIB_NAME, *_typeSupportLib); |
35 | | - _responseTypeSupportHdl = rclcpp::get_message_typesupport_handle( |
36 | | -@@ -155,7 +155,7 @@ std::shared_ptr<rmw_request_id_t> GenericClient::create_request_header() { |
37 | | - return std::shared_ptr<rmw_request_id_t>(new rmw_request_id_t); |
38 | | - } |
39 | | - |
40 | | --#if RCLCPP_VERSION_GTE(31, 0, 0) |
41 | | -+#if (RCLCPP_VERSION_MAJOR > 31 || (RCLCPP_VERSION_MAJOR == 31 && (RCLCPP_VERSION_MINOR > 0 || (RCLCPP_VERSION_MINOR == 0 && RCLCPP_VERSION_PATCH >= 0)))) |
42 | | - void GenericClient::handle_response(const std::shared_ptr<rmw_request_id_t>& request_header, |
43 | | - const std::shared_ptr<void>& response) { |
44 | | - #else |
45 | | -diff --git a/src/message_definition_cache.cpp b/src/message_definition_cache.cpp |
46 | | -index ed85745..212e5df 100644 |
47 | | ---- a/src/message_definition_cache.cpp |
48 | | -+++ b/src/message_definition_cache.cpp |
49 | | -@@ -12,7 +12,7 @@ |
50 | | - #include <utility> |
51 | | - |
52 | | - #include <ament_index_cpp/version.h> |
53 | | --#if AMENT_INDEX_CPP_VERSION_GTE(1, 13, 2) |
54 | | -+#if (AMENT_INDEX_CPP_VERSION_MAJOR > 1 || (AMENT_INDEX_CPP_VERSION_MAJOR == 1 && (AMENT_INDEX_CPP_VERSION_MINOR > 13 || (AMENT_INDEX_CPP_VERSION_MINOR == 13 && AMENT_INDEX_CPP_VERSION_PATCH >= 2)))) |
55 | | - #include <ament_index_cpp/get_package_share_path.hpp> |
56 | | - #else |
57 | | - #include <ament_index_cpp/get_package_share_directory.hpp> |
58 | | -@@ -221,7 +221,7 @@ const MessageSpec& MessageDefinitionCache::load_message_spec( |
59 | | - |
60 | | - // Get the package share directory, or throw a PackageNotFoundError |
61 | | - std::filesystem::path share_dir; |
62 | | --#if AMENT_INDEX_CPP_VERSION_GTE(1, 13, 2) |
63 | | -+#if (AMENT_INDEX_CPP_VERSION_MAJOR > 1 || (AMENT_INDEX_CPP_VERSION_MAJOR == 1 && (AMENT_INDEX_CPP_VERSION_MINOR > 13 || (AMENT_INDEX_CPP_VERSION_MINOR == 13 && AMENT_INDEX_CPP_VERSION_PATCH >= 2)))) |
64 | | - share_dir = ament_index_cpp::get_package_share_path(package); |
65 | | - #else |
66 | | - share_dir = ament_index_cpp::get_package_share_directory(package); |
67 | | -@@ -229,7 +229,7 @@ const MessageSpec& MessageDefinitionCache::load_message_spec( |
68 | | - |
69 | | - // Get the rosidl_interfaces index contents for this package |
70 | | - std::string index_contents; |
71 | | --#if AMENT_INDEX_CPP_VERSION_GTE(1, 13, 0) |
72 | | -+#if (AMENT_INDEX_CPP_VERSION_MAJOR > 1 || (AMENT_INDEX_CPP_VERSION_MAJOR == 1 && (AMENT_INDEX_CPP_VERSION_MINOR > 13 || (AMENT_INDEX_CPP_VERSION_MINOR == 13 && AMENT_INDEX_CPP_VERSION_PATCH >= 0)))) |
73 | | - ament_index_cpp::PathWithResource path_with_resource = |
74 | | - ament_index_cpp::get_resource("rosidl_interfaces", package); |
75 | | - if (path_with_resource.resourcePath == std::nullopt) { |
76 | | -diff --git a/src/ros2_foxglove_bridge.cpp b/src/ros2_foxglove_bridge.cpp |
77 | | -index 2229aad..73d3d3e 100644 |
78 | | ---- a/src/ros2_foxglove_bridge.cpp |
79 | | -+++ b/src/ros2_foxglove_bridge.cpp |
80 | | -@@ -59,7 +59,7 @@ inline std::vector<std::byte> readFile(const std::string& filepath) { |
81 | | - return buffer; |
82 | | - } |
83 | | - |
84 | | --#if !RCLCPP_VERSION_GTE(28, 0, 0) |
85 | | -+#if !(RCLCPP_VERSION_MAJOR > 28 || (RCLCPP_VERSION_MAJOR == 28 && (RCLCPP_VERSION_MINOR > 0 || (RCLCPP_VERSION_MINOR == 0 && RCLCPP_VERSION_PATCH >= 0)))) |
86 | | - // Prior to Jazzy, GenericSubscription drops MessageInfo from the callback. |
87 | | - // This subclass overrides handle_serialized_message to forward it. |
88 | | - class GenericSubscriptionWithMessageInfo : public rclcpp::GenericSubscription { |
89 | | -@@ -833,7 +833,7 @@ Subscription FoxgloveBridge::createRosSubscription(ChannelId channelId, const st |
90 | | - subscriptionOptions.event_callbacks = eventCallbacks; |
91 | | - subscriptionOptions.callback_group = _subscriptionCallbackGroup; |
92 | | - |
93 | | --#if RCLCPP_VERSION_GTE(28, 0, 0) |
94 | | -+#if (RCLCPP_VERSION_MAJOR > 28 || (RCLCPP_VERSION_MAJOR == 28 && (RCLCPP_VERSION_MINOR > 0 || (RCLCPP_VERSION_MINOR == 0 && RCLCPP_VERSION_PATCH >= 0)))) |
95 | | - return this->create_generic_subscription( |
96 | | - topic, datatype, qos, |
97 | | - [this, channelId](std::shared_ptr<const rclcpp::SerializedMessage> msg, |
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | +--- a/CMakeLists.txt |
| 3 | ++++ b/CMakeLists.txt |
| 4 | +@@ -62,7 +62,7 @@ endif() |
| 5 | + |
| 6 | + macro(enable_strict_compiler_warnings target) |
| 7 | + if (MSVC) |
| 8 | +- target_compile_options(${target} PRIVATE /WX /W4) |
| 9 | ++ target_compile_options(${target} PRIVATE /W4) |
| 10 | + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") |
| 11 | + target_compile_options(${target} PRIVATE -Wall -Wextra -Wpedantic -Werror -Wold-style-cast -Wfloat-equal -Wmost -Wunused-exception-parameter) |
| 12 | + else() |
0 commit comments