fgerlits commented on code in PR #1589:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1589#discussion_r1259656414
##########
libminifi/include/agent/agent_docs.h:
##########
@@ -61,9 +63,12 @@ struct Components {
};
namespace detail {
-template<typename Container>
-auto toVector(const Container& container) {
- return std::vector<typename Container::value_type>(container.begin(),
container.end());
+inline auto toVector(std::span<const core::PropertyReference> properties) {
+ return std::vector<core::Property>(properties.begin(), properties.end());
+}
+
+inline auto toVector(std::span<const core::RelationshipDefinition>
relationships) {
+ return std::vector<core::Relationship>(relationships.begin(),
relationships.end());
Review Comment:
This would mean changing
```c++
.class_properties_ = detail::toVector(Class::Properties)
```
to
```c++
.class_properties_ =
utils::span_to<std::vector<core::Property>>(std::span<const
core::PropertyReference>(Class::Properties))
```
in three places (plus one more for Relationships). I'll do it if you think
it's nicer, but I'm not sure it's nicer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]