Skip to content

Commit b22731b

Browse files
committed
Use dynamic typesupport identifier getter
Signed-off-by: methylDragon <[email protected]>
1 parent ca17caf commit b22731b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rclcpp/include/rclcpp/dynamic_subscription.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class DynamicSubscription : public rclcpp::SubscriptionBase
8080
}
8181

8282
if (type_support->get_rosidl_message_type_support()->typesupport_identifier !=
83-
rmw_dynamic_typesupport_c__identifier)
83+
rmw_get_dynamic_typesupport_identifier())
8484
{
8585
throw std::runtime_error(
8686
"DynamicSubscription must use dynamic type introspection type support!");

rclcpp/src/rclcpp/dynamic_typesupport/dynamic_message_type_support.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <memory>
2222
#include <string>
2323

24-
#include "rcl/rcl_dynamic_typesupport_c/message_introspection.h"
24+
#include "rcl/dynamic_message_type_support.h"
2525
#include "rcl/type_hash.h"
2626
#include "rcl/types.h"
2727
#include "rcutils/logging_macros.h"
@@ -70,7 +70,7 @@ DynamicMessageTypeSupport::DynamicMessageTypeSupport(
7070
if (!ts->data) {
7171
throw std::runtime_error("could not init rosidl message type support impl");
7272
}
73-
if (ts->typesupport_identifier != rmw_dynamic_typesupport_c__identifier) {
73+
if (ts->typesupport_identifier != rmw_get_dynamic_typesupport_identifier()) {
7474
throw std::runtime_error("rosidl message type support is of the wrong type");
7575
}
7676

@@ -132,7 +132,7 @@ DynamicMessageTypeSupport::DynamicMessageTypeSupport(
132132
if (!ts->data) {
133133
throw std::runtime_error("could not init rosidl message type support impl");
134134
}
135-
if (ts->typesupport_identifier != rmw_dynamic_typesupport_c__identifier) {
135+
if (ts->typesupport_identifier != rmw_get_dynamic_typesupport_identifier()) {
136136
throw std::runtime_error("rosidl message type support is of the wrong type");
137137
}
138138

@@ -316,7 +316,7 @@ DynamicMessageTypeSupport::init_rosidl_message_type_support_(
316316
// are managed by the passed in SharedPtr wrapper classes. We just delete it.
317317
rosidl_message_type_support_.reset(
318318
new rosidl_message_type_support_t{
319-
rmw_dynamic_typesupport_c__identifier, // typesupport_identifier
319+
rmw_get_dynamic_typesupport_identifier(), // typesupport_identifier
320320
ts_impl, // data
321321
get_message_typesupport_handle_function, // func
322322
// get_type_hash_func

0 commit comments

Comments
 (0)