Skip to content

Commit

Permalink
fix: init concatenated_vector with begin() & end() (#2492)
Browse files Browse the repository at this point in the history
*. this commit will fix the warning [-Wstringop-overflow=] #2461

Signed-off-by: homalozoa <[email protected]>
  • Loading branch information
homalozoa authored Apr 8, 2024
1 parent 04ea0bb commit 63c2e2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rclcpp/include/rclcpp/experimental/intra_process_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ class IntraProcessManager
// So this case is equivalent to all the buffers requiring ownership

// Merge the two vector of ids into a unique one
std::vector<uint64_t> concatenated_vector(sub_ids.take_shared_subscriptions);
std::vector<uint64_t> concatenated_vector(
sub_ids.take_shared_subscriptions.begin(), sub_ids.take_shared_subscriptions.end());
concatenated_vector.insert(
concatenated_vector.end(),
sub_ids.take_ownership_subscriptions.begin(),
Expand Down

0 comments on commit 63c2e2e

Please sign in to comment.