Skip to content

Commit d8317c6

Browse files
jfinkenapojomovsky
authored andcommitted
Do not call get_non_local_subscription_count (irobot-ros#138)
Use the previous mechanism, and do not call that method but leave it in the codebase.
1 parent 106c03a commit d8317c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rclcpp/include/rclcpp/publisher.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class Publisher : public PublisherBase
237237
// It's not possible to do that with an unique_ptr,
238238
// as do_intra_process_publish takes the ownership of the message.
239239
bool inter_process_publish_needed =
240-
get_non_local_subscription_count() > 0;
240+
get_subscription_count() > get_intra_process_subscription_count();
241241

242242
if (inter_process_publish_needed) {
243243
auto shared_msg =
@@ -306,7 +306,7 @@ class Publisher : public PublisherBase
306306
}
307307

308308
bool inter_process_publish_needed =
309-
get_non_local_subscription_count() > 0;
309+
get_subscription_count() > get_intra_process_subscription_count();
310310

311311
if (inter_process_publish_needed) {
312312
ROSMessageType ros_msg;

0 commit comments

Comments
 (0)