Skip to content

Commit

Permalink
fixed allocator compilation problems
Browse files Browse the repository at this point in the history
Signed-off-by: Gonzalo de Pedro <[email protected]>
  • Loading branch information
Gonzalo de Pedro authored and clalancette committed Dec 7, 2021
1 parent dd64c98 commit 3fcf467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ class SubscriptionIntraProcessBuffer : public ROSMessageIntraProcessBuffer<ROSMe

using BufferUniquePtr = typename rclcpp::experimental::buffers::IntraProcessBuffer<
SubscribedType,
SubscribedTypeAllocator,
Alloc,
SubscribedTypeDeleter
>::UniquePtr;

SubscriptionIntraProcessBuffer(
std::shared_ptr<SubscribedTypeAllocator> allocator,
std::shared_ptr<Alloc> allocator,
rclcpp::Context::SharedPtr context,
const std::string & topic_name,
const rclcpp::QoS & qos_profile,
rclcpp::IntraProcessBufferType buffer_type)
: ROSMessageIntraProcessBuffer<ROSMessageT, ROSMessageTypeAllocator, ROSMessageTypeDeleter>(context, topic_name, qos_profile)
: ROSMessageIntraProcessBuffer<ROSMessageT, Alloc, ROSMessageTypeDeleter>(context, topic_name, qos_profile)
{
// Create the intra-process buffer.
buffer_ = rclcpp::experimental::create_intra_process_buffer<SubscribedType, SubscribedTypeAllocator, SubscribedTypeDeleter>(
buffer_ = rclcpp::experimental::create_intra_process_buffer<SubscribedType, Alloc, SubscribedTypeDeleter>(
buffer_type,
qos_profile,
allocator);
Expand Down
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/subscription.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Subscription : public SubscriptionBase
auto context = node_base->get_context();
subscription_intra_process_ = std::make_shared<SubscriptionIntraProcessT>(
callback,
std::make_shared<SubscribedTypeAllocator>(*options.get_allocator()),
options.get_allocator(),
context,
this->get_topic_name(), // important to get like this, as it has the fully-qualified name
qos_profile,
Expand Down Expand Up @@ -407,7 +407,7 @@ class Subscription : public SubscriptionBase

using SubscriptionIntraProcessT = rclcpp::experimental::SubscriptionIntraProcess<
SubscribedType,
SubscribedTypeAllocator,
AllocatorT,
SubscribedTypeDeleter>;
std::shared_ptr<SubscriptionIntraProcessT> subscription_intra_process_;

Expand Down

0 comments on commit 3fcf467

Please sign in to comment.