Skip to content

Commit 790d970

Browse files
replace rsl::StaticVector by std::array
1 parent 5640b1f commit 790d970

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

generate_parameter_library_py/generate_parameter_library_py/cpp_conversions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def __init__(self):
4949
'double_array': lambda defined_type, templates: 'std::vector<double>',
5050
'int_array': lambda defined_type, templates: 'std::vector<int64_t>',
5151
'string_array': lambda defined_type, templates: 'std::vector<std::string>',
52-
'double_array_fixed': lambda defined_type, templates: f'rsl::StaticVector<{templates[0]}, {templates[1]}>',
53-
'int_array_fixed': lambda defined_type, templates: f'rsl::StaticVector<{templates[0]}, {templates[1]}>',
54-
'string_array_fixed': lambda defined_type, templates: f'rsl::StaticVector<{templates[0]}, {templates[1]}>',
52+
'double_array_fixed': lambda defined_type, templates: f'std::array<{templates[0]}, {templates[1]}>',
53+
'int_array_fixed': lambda defined_type, templates: f'std::array<{templates[0]}, {templates[1]}>',
54+
'string_array_fixed': lambda defined_type, templates: f'std::array<{templates[0]}, {templates[1]}>',
5555
'string_fixed': lambda defined_type, templates: f'rsl::StaticString<{templates[1]}>',
5656
}
5757
self.yaml_type_to_as_function = {

generate_parameter_library_py/generate_parameter_library_py/jinja_templates/cpp/parameter_library_header

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <fmt/ranges.h>
2323

2424
#include <rsl/static_string.hpp>
25-
#include <rsl/static_vector.hpp>
2625
#include <rsl/parameter_validators.hpp>
2726

2827
{% if user_validation_file|length -%}
@@ -60,7 +59,7 @@ template <size_t capacity>
6059
}
6160

6261
template <typename T, size_t capacity>
63-
[[nodiscard]] auto to_parameter_value(rsl::StaticVector<T, capacity> const& value) {
62+
[[nodiscard]] auto to_parameter_value(std::array<T, capacity> const& value) {
6463
return rclcpp::ParameterValue(rsl::to_vector(value));
6564
}
6665

0 commit comments

Comments
 (0)