Skip to content

Commit 5d0a516

Browse files
authored
Do not call get_non_local_subscription_count (#138)
Use the previous mechanism, and do not call that method but leave it in the codebase.
1 parent da09f92 commit 5d0a516

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
@@ -273,7 +273,7 @@ class Publisher : public PublisherBase
273273
// It's not possible to do that with an unique_ptr,
274274
// as do_intra_process_publish takes the ownership of the message.
275275
bool inter_process_publish_needed =
276-
get_non_local_subscription_count() > 0;
276+
get_subscription_count() > get_intra_process_subscription_count();
277277

278278
if (inter_process_publish_needed) {
279279
auto shared_msg =
@@ -351,7 +351,7 @@ class Publisher : public PublisherBase
351351
}
352352

353353
bool inter_process_publish_needed =
354-
get_non_local_subscription_count() > 0;
354+
get_subscription_count() > get_intra_process_subscription_count();
355355

356356
if (inter_process_publish_needed) {
357357
auto ros_msg_ptr = std::make_shared<ROSMessageType>();

0 commit comments

Comments
 (0)