Skip to content

Commit

Permalink
Attempt to fix RHEL9 build failure
Browse files Browse the repository at this point in the history
- Include <algorithm> header and explicitly use reference on
topic_metadata in a lambda capture list.
  • Loading branch information
MichaelOrlov committed Jul 25, 2024
1 parent 3000974 commit 4bfbd95
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <sys/stat.h>

#include <algorithm>
#include <atomic>
#include <chrono>
#include <cstring>
Expand Down Expand Up @@ -538,7 +539,7 @@ rosbag2_storage::BagMetadata SqliteStorage::get_metadata()
auto & topics_list = metadata.topics_with_message_count;
auto it = std::find_if(
topics_list.begin(), topics_list.end(),
[&](const rosbag2_storage::TopicInformation & topic_info) {
[&topic_metadata = topic_metadata](const rosbag2_storage::TopicInformation & topic_info) {
return topic_info.topic_metadata == topic_metadata;
});
if (it != topics_list.end()) {
Expand Down Expand Up @@ -570,7 +571,7 @@ rosbag2_storage::BagMetadata SqliteStorage::get_metadata()
auto & topics_list = metadata.topics_with_message_count;
auto it = std::find_if(
topics_list.begin(), topics_list.end(),
[&](const rosbag2_storage::TopicInformation & topic_info) {
[&topic_metadata = topic_metadata](const rosbag2_storage::TopicInformation & topic_info) {
return topic_info.topic_metadata == topic_metadata;
});
if (it != topics_list.end()) {
Expand Down

0 comments on commit 4bfbd95

Please sign in to comment.