Skip to content

Commit c6ec3dd

Browse files
committed
Addressed code style test failures.
Signed-off-by: Steve Wolter <swolter@google.com>
1 parent 929d8f5 commit c6ec3dd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

rclcpp/include/rclcpp/allocator/allocator_common.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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();

rclcpp/include/rclcpp/publisher_options.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

rclcpp/include/rclcpp/subscription_options.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)