Skip to content

Commit

Permalink
Fix const
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed Mar 24, 2023
1 parent 4f11b1d commit 318f951
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ RCL_WARN_UNUSED
rosidl_message_type_support_t *
rcl_get_dynamic_message_typesupport_handle(
const char * serialization_lib_name,
// TODO(methylDragon): This should be type_description_interfaces__msg__TypeDescription
rosidl_runtime_c__type_description__TypeDescription * desc);
// TODO(methylDragon): This should be const type_description_interfaces__msg__TypeDescription
const rosidl_runtime_c__type_description__TypeDescription * desc);

/// Finalize a rosidl_message_type_support_t obtained with
/// rcl_get_dynamic_message_typesupport_handle
Expand Down
3 changes: 2 additions & 1 deletion rcl/include/rcl/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,11 @@ rcl_take_serialized_message(
* occurred in the middleware, or
* \return #RCL_RET_ERROR if an unspecified error occurs.
*/
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_take_dynamic_message(
const rcl_subscription_t * subscription,
// TODO(methylDragon): Replace this with rcl_dynamic_message_t
rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message,
rmw_message_info_t * message_info,
rmw_subscription_allocation_t * allocation);
Expand Down
4 changes: 2 additions & 2 deletions rcl/src/rcl/rcl_dynamic_typesupport_c/message_introspection.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ RCL_WARN_UNUSED
rosidl_message_type_support_t *
rcl_get_dynamic_message_typesupport_handle(
const char * serialization_lib_name,
// TODO(methylDragon): This should be type_description_interfaces__msg__TypeDescription
rosidl_runtime_c__type_description__TypeDescription * description)
// TODO(methylDragon): This should be const type_description_interfaces__msg__TypeDescription
const rosidl_runtime_c__type_description__TypeDescription * description)
{
return rmw_get_dynamic_message_typesupport_handle(
rmw_get_serialization_support(serialization_lib_name),
Expand Down
4 changes: 1 addition & 3 deletions rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,9 @@ rcl_take_serialized_message(
rcl_ret_t
rcl_take_dynamic_message(
const rcl_subscription_t * subscription,
// TODO(methylDragon): Replace this with rclcpp::DynamicMessage
rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message,
rmw_message_info_t * message_info,
rmw_subscription_allocation_t * allocation
)
rmw_subscription_allocation_t * allocation)
{
RCUTILS_LOG_DEBUG_NAMED(ROS_PACKAGE_NAME, "Subscription taking dynamic message");
if (!rcl_subscription_is_valid(subscription)) {
Expand Down

0 comments on commit 318f951

Please sign in to comment.