File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ rcl_allocator_t get_rcl_allocator(Alloc & allocator)
8080 return rcl_allocator;
8181}
8282
83- template <typename T>
84- rcl_allocator_t get_rcl_allocator (std::allocator<T>& allocator)
83+ template <typename T>
84+ rcl_allocator_t get_rcl_allocator (std::allocator<T> & allocator)
8585{
8686 (void )allocator; // Remove warning
8787 return rcl_get_default_allocator ();
Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ struct PublisherOptionsWithAllocator : public PublisherOptionsBase
7575 using AllocatorTraits = std::allocator_traits<Allocator>;
7676 using MessageAllocatorT = typename AllocatorTraits::template rebind_alloc<MessageT>;
7777 auto message_alloc = std::make_shared<MessageAllocatorT>(*this ->get_allocator ().get ());
78- // TODO: This is likely to invoke undefined behavior - message_alloc goes out of scope
79- // at the end of this function, but the allocator doesn't.
78+ // TODO(stevewolter) : This is likely to invoke undefined behavior - message_alloc goes
79+ // out of scope at the end of this function, but the allocator doesn't.
8080 result.allocator = get_rcl_allocator (*message_alloc);
8181 result.qos = qos.get_rmw_qos_profile ();
8282
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ struct SubscriptionOptionsWithAllocator : public SubscriptionOptionsBase
102102 using AllocatorTraits = std::allocator_traits<Allocator>;
103103 using MessageAllocatorT = typename AllocatorTraits::template rebind_alloc<MessageT>;
104104 auto message_alloc = std::make_shared<MessageAllocatorT>(*allocator.get ());
105- // TODO: This is likely to invoke undefined behavior - message_alloc goes out of scope
106- // at the end of this function, but the allocator doesn't.
105+ // TODO(stevewolter) : This is likely to invoke undefined behavior - message_alloc
106+ // goes out of scope at the end of this function, but the allocator doesn't.
107107 result.allocator = get_rcl_allocator (*message_alloc);
108108 result.qos = qos.get_rmw_qos_profile ();
109109 result.rmw_subscription_options .ignore_local_publications = this ->ignore_local_publications ;
You can’t perform that action at this time.
0 commit comments