Skip to content

Commit

Permalink
Update deprecated methods (#546)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
ahcorde authored Jul 9, 2024
1 parent fe5fe5b commit 2816750
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test_rclcpp/test/test_waitable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,20 @@ class WaitableWithTimer : public rclcpp::Waitable
}

void
add_to_wait_set(rcl_wait_set_t * wait_set) override
add_to_wait_set(rcl_wait_set_t & wait_set) override
{
rcl_ret_t ret = rcl_wait_set_add_timer(wait_set, timer_.get(), &timer_idx_);
rcl_ret_t ret = rcl_wait_set_add_timer(&wait_set,
timer_.get(), &timer_idx_);
if (RCL_RET_OK != ret) {
throw std::runtime_error("failed to add timer to wait set");
}
}

bool
is_ready(rcl_wait_set_t * wait_set) override
is_ready(const rcl_wait_set_t & wait_set) override
{
if (timer_idx_ < wait_set->size_of_timers) {
return nullptr != wait_set->timers[timer_idx_];
if (timer_idx_ < wait_set.size_of_timers) {
return nullptr != wait_set.timers[timer_idx_];
}
return false;
}
Expand All @@ -79,7 +80,7 @@ class WaitableWithTimer : public rclcpp::Waitable
}

void
execute(std::shared_ptr<void> & data) override
execute(const std::shared_ptr<void> & data) override
{
(void)data;
rcl_ret_t ret = rcl_timer_call(timer_.get());
Expand Down

0 comments on commit 2816750

Please sign in to comment.