Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class TestBackendNestedMsgsSubscriber : public rclcpp::Node
}

private:
void on_msg(const test_rosidl_buffer::msg::ByteArrayList::SharedPtr msg)
void on_msg(const test_rosidl_buffer::msg::ByteArrayList::ConstSharedPtr msg)
{
++received_;
bool ok = true;
Expand Down
2 changes: 1 addition & 1 deletion test_rosidl_buffer/src/test_backend_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class TestBackendSubscriber : public rclcpp::Node
}

private:
void on_msg(const test_rosidl_buffer::msg::ByteArray::SharedPtr msg)
void on_msg(const test_rosidl_buffer::msg::ByteArray::ConstSharedPtr msg)
{
++received_;
bool ok = true;
Expand Down
4 changes: 2 additions & 2 deletions test_rosidl_buffer/test/test_buffer_publisher_gid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ TEST_F(TestBufferPublisherGid, backend_receives_publisher_gid) {
auto node = std::make_shared<rclcpp::Node>("test_buffer_publisher_gid");
const auto qos = rclcpp::QoS(10).reliable();

std::vector<ByteArray::SharedPtr> received;
std::vector<ByteArray::ConstSharedPtr> received;
rclcpp::SubscriptionOptions options;
options.acceptable_buffer_backends = "any";
auto sub = node->create_subscription<ByteArray>(
"test_buffer_publisher_gid", qos,
[&received](ByteArray::SharedPtr msg) {received.push_back(msg);}, options);
[&received](ByteArray::ConstSharedPtr msg) {received.push_back(msg);}, options);
auto pub = node->create_publisher<ByteArray>("test_buffer_publisher_gid", qos);

rclcpp::executors::SingleThreadedExecutor executor;
Expand Down