Skip to content

Commit

Permalink
Make backport API compatible
Browse files Browse the repository at this point in the history
- Add default value for newly added argument "sorting_method" in
"print_output(..)" and "print_output_verbose(..)"

Signed-off-by: Michael Orlov <[email protected]>
  • Loading branch information
MichaelOrlov committed Dec 2, 2024
1 parent 57a7ae8 commit 27a280e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rosbag2_py/src/rosbag2_py/_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Info
}

void print_output(
const rosbag2_storage::BagMetadata & metadata_info, const std::string & sorting_method)
const rosbag2_storage::BagMetadata & metadata_info, const std::string & sorting_method = "name")
{
InfoSortingMethod sort_method = info_sorting_method_from_string(sorting_method);
// Output formatted metadata
Expand Down Expand Up @@ -74,7 +74,7 @@ class Info
void print_output_verbose(
const std::string & uri,
const rosbag2_storage::BagMetadata & metadata_info,
const std::string & sorting_method)
const std::string & sorting_method = "name")
{
std::vector<std::shared_ptr<rosbag2_cpp::rosbag2_service_info_t>> all_services_info;
for (auto & file_info : metadata_info.files) {
Expand Down

0 comments on commit 27a280e

Please sign in to comment.