Skip to content

Commit

Permalink
Do not call get_non_local_subscription_count (irobot-ros#138)
Browse files Browse the repository at this point in the history
Use the previous mechanism, and do not call that method but leave
it in the codebase.
  • Loading branch information
jfinken authored and apojomovsky committed Jun 6, 2024
1 parent ee51cc9 commit 280c182
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Publisher : public PublisherBase
// It's not possible to do that with an unique_ptr,
// as do_intra_process_publish takes the ownership of the message.
bool inter_process_publish_needed =
get_non_local_subscription_count() > 0;
get_subscription_count() > get_intra_process_subscription_count();

if (inter_process_publish_needed) {
auto shared_msg =
Expand Down Expand Up @@ -306,7 +306,7 @@ class Publisher : public PublisherBase
}

bool inter_process_publish_needed =
get_non_local_subscription_count() > 0;
get_subscription_count() > get_intra_process_subscription_count();

if (inter_process_publish_needed) {
ROSMessageType ros_msg;
Expand Down

0 comments on commit 280c182

Please sign in to comment.