Skip to content

Commit 0efab07

Browse files
author
Mauro Passerino
committed
Reorder APIs arguments
1 parent 98efb4c commit 0efab07

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

rclcpp/include/rclcpp/executors/events_executor_notify_waitable.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ class EventsExecutorNotifyWaitable final : public EventWaitable
6666
{
6767
for (auto gc : notify_guard_conditions_) {
6868
rcl_ret_t ret = rcl_guard_condition_set_listener_callback(
69-
executor,
69+
gc,
7070
executor_callback,
71+
executor,
7172
this,
72-
gc,
7373
false);
7474

7575
if (RCL_RET_OK != ret) {

rclcpp/src/rclcpp/client.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ ClientBase::set_events_executor_callback(
205205
rmw_listener_cb_t executor_callback) const
206206
{
207207
rcl_ret_t ret = rcl_client_set_listener_callback(
208-
executor,
208+
client_handle_.get(),
209209
executor_callback,
210-
this,
211-
client_handle_.get());
210+
executor,
211+
this);
212212

213213
if (RCL_RET_OK != ret) {
214214
throw std::runtime_error("Couldn't set the EventsExecutor's callback to client");

rclcpp/src/rclcpp/executors/events_executor_entities_collector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,10 @@ EventsExecutorEntitiesCollector::set_guard_condition_callback(
478478
const rcl_guard_condition_t * guard_condition)
479479
{
480480
rcl_ret_t ret = rcl_guard_condition_set_listener_callback(
481-
associated_executor_,
481+
guard_condition,
482482
&EventsExecutor::push_event,
483+
associated_executor_,
483484
this,
484-
guard_condition,
485485
false /* Discard previous events */);
486486

487487
if (ret != RCL_RET_OK) {
@@ -494,10 +494,10 @@ EventsExecutorEntitiesCollector::unset_guard_condition_callback(
494494
const rcl_guard_condition_t * guard_condition)
495495
{
496496
rcl_ret_t ret = rcl_guard_condition_set_listener_callback(
497+
guard_condition,
497498
nullptr,
498499
nullptr,
499500
nullptr,
500-
guard_condition,
501501
false /* Discard previous events */);
502502

503503
if (ret != RCL_RET_OK) {

rclcpp/src/rclcpp/qos_event.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ QOSEventHandlerBase::set_events_executor_callback(
7474
rmw_listener_cb_t executor_callback) const
7575
{
7676
rcl_ret_t ret = rcl_event_set_listener_callback(
77-
executor,
77+
&event_handle_,
7878
executor_callback,
79+
executor,
7980
this,
80-
&event_handle_,
8181
false /* Discard previous events */);
8282

8383
if (RCL_RET_OK != ret) {

rclcpp/src/rclcpp/service.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ ServiceBase::set_events_executor_callback(
9191
rmw_listener_cb_t executor_callback) const
9292
{
9393
rcl_ret_t ret = rcl_service_set_listener_callback(
94-
executor,
94+
service_handle_.get(),
9595
executor_callback,
96-
this,
97-
service_handle_.get());
96+
executor,
97+
this);
9898

9999
if (RCL_RET_OK != ret) {
100100
throw std::runtime_error("Couldn't set the EventsExecutor's callback to service");

rclcpp/src/rclcpp/subscription_base.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ SubscriptionBase::set_events_executor_callback(
295295
rmw_listener_cb_t executor_callback) const
296296
{
297297
rcl_ret_t ret = rcl_subscription_set_listener_callback(
298-
executor,
298+
subscription_handle_.get(),
299299
executor_callback,
300-
this,
301-
subscription_handle_.get());
300+
executor,
301+
this);
302302

303303
if (RCL_RET_OK != ret) {
304304
throw std::runtime_error("Couldn't set the EventsExecutor's callback to subscription");

rclcpp/src/rclcpp/subscription_intra_process_base.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ SubscriptionIntraProcessBase::set_events_executor_callback(
4343
rmw_listener_cb_t executor_callback) const
4444
{
4545
rcl_ret_t ret = rcl_guard_condition_set_listener_callback(
46-
executor,
46+
&gc_,
4747
executor_callback,
48+
executor,
4849
this,
49-
&gc_,
5050
true /*Use previous events*/);
5151

5252
if (RCL_RET_OK != ret) {

rclcpp/test/rclcpp/executors/test_executors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,10 @@ class TestWaitable : public rclcpp::Waitable
473473
rmw_listener_cb_t executor_callback) const override
474474
{
475475
rcl_ret_t ret = rcl_guard_condition_set_listener_callback(
476-
executor,
476+
&gc_,
477477
executor_callback,
478+
executor,
478479
this,
479-
&gc_,
480480
true /*Use previous events*/);
481481

482482
if (RCL_RET_OK != ret) {

0 commit comments

Comments
 (0)