Skip to content

Commit 38fc4d2

Browse files
committed
Remove durability_is_transient_local_ from publisher_base
Signed-off-by: Jeffery Hsu <[email protected]>
1 parent b000250 commit 38fc4d2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

rclcpp/include/rclcpp/publisher_base.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ class PublisherBase : public std::enable_shared_from_this<PublisherBase>
369369
using IntraProcessManagerWeakPtr =
370370
std::weak_ptr<rclcpp::experimental::IntraProcessManager>;
371371
bool intra_process_is_enabled_;
372-
const bool durability_is_transient_local_;
373372
IntraProcessManagerWeakPtr weak_ipm_;
374373
uint64_t intra_process_publisher_id_;
375374

rclcpp/src/rclcpp/publisher_base.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ PublisherBase::PublisherBase(
4848
const rcl_publisher_options_t & publisher_options)
4949
: rcl_node_handle_(node_base->get_shared_rcl_node_handle()),
5050
intra_process_is_enabled_(false),
51-
durability_is_transient_local_(
52-
publisher_options.qos.durability == RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL),
5351
intra_process_publisher_id_(0),
5452
type_support_(type_support)
5553
{
@@ -211,7 +209,8 @@ PublisherBase::get_intra_process_subscription_count() const
211209
bool
212210
PublisherBase::is_durability_transient_local() const
213211
{
214-
return durability_is_transient_local_;
212+
return rcl_publisher_get_actual_qos(publisher_handle_.get())->durability ==
213+
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
215214
}
216215

217216
rclcpp::QoS

0 commit comments

Comments
 (0)