Skip to content

Commit

Permalink
Make sure rmw_publisher_options is initialized in to_rcl_publisher_op…
Browse files Browse the repository at this point in the history
…tions. (ros2#1099)

Signed-off-by: ChenYing Kuo <evshary@gmail.com>
  • Loading branch information
evshary authored and Joshua Hampp committed Jul 7, 2020
1 parent b1b525b commit 55854a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/publisher_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct PublisherOptionsWithAllocator : public PublisherOptionsBase
rcl_publisher_options_t
to_rcl_publisher_options(const rclcpp::QoS & qos) const
{
rcl_publisher_options_t result;
rcl_publisher_options_t result = rcl_publisher_get_default_options();
using AllocatorTraits = std::allocator_traits<Allocator>;
using MessageAllocatorT = typename AllocatorTraits::template rebind_alloc<MessageT>;
auto message_alloc = std::make_shared<MessageAllocatorT>(*this->get_allocator().get());
Expand Down

0 comments on commit 55854a7

Please sign in to comment.