From 26a4b83d1b9443795dbcb21fa6c23117f113216a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 9 May 2023 23:15:43 +0000 Subject: libcamera: Remove `StreamRoles` alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that `Camera::generateConfiguration()` takes a `libcamera::Span` of `StreamRole`, remove the `StreamRoles` type, which was an alias to `std::vector`. The removal has two reasons: - it is no longer strictly necessary, - its presence may suggest that that is the preferred (or correct) way to build/pass a list of `StreamRole`. Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham [Kieran: Fix small checkstyle report on roles initialiser] Signed-off-by: Kieran Bingham --- src/apps/common/stream_options.cpp | 4 ++-- src/apps/common/stream_options.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/apps/common') diff --git a/src/apps/common/stream_options.cpp b/src/apps/common/stream_options.cpp index 19dfe051..663b979a 100644 --- a/src/apps/common/stream_options.cpp +++ b/src/apps/common/stream_options.cpp @@ -40,7 +40,7 @@ KeyValueParser::Options StreamKeyValueParser::parse(const char *arguments) return options; } -StreamRoles StreamKeyValueParser::roles(const OptionValue &values) +std::vector StreamKeyValueParser::roles(const OptionValue &values) { /* If no configuration values to examine default to viewfinder. */ if (values.empty()) @@ -48,7 +48,7 @@ StreamRoles StreamKeyValueParser::roles(const OptionValue &values) const std::vector &streamParameters = values.toArray(); - StreamRoles roles; + std::vector roles; for (auto const &value : streamParameters) { /* If a role is invalid default it to viewfinder. */ roles.push_back(parseRole(value.toKeyValues()).value_or(StreamRole::Viewfinder)); diff --git a/src/apps/common/stream_options.h b/src/apps/common/stream_options.h index fe298c84..a5f3bde0 100644 --- a/src/apps/common/stream_options.h +++ b/src/apps/common/stream_options.h @@ -20,7 +20,7 @@ public: KeyValueParser::Options parse(const char *arguments) override; - static libcamera::StreamRoles roles(const OptionValue &values); + static std::vector roles(const OptionValue &values); static int updateConfiguration(libcamera::CameraConfiguration *config, const OptionValue &values); -- cgit v1.2.1