From 58e0b6e18c425072a47594f42fc0b61801403aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 13 Feb 2023 16:43:06 +0000 Subject: apps: Return std::optional<> from StreamKeyValueParser::parseRole() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of having bool return type and an out parameter, use std::optional to return from StreamKeyValueParser::parseRole(). Meanwhile at it, re-word an existing comment to make it lucid. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain Signed-off-by: Umang Jain --- src/apps/common/stream_options.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/apps/common/stream_options.h') diff --git a/src/apps/common/stream_options.h b/src/apps/common/stream_options.h index 35e4e7c0..fe298c84 100644 --- a/src/apps/common/stream_options.h +++ b/src/apps/common/stream_options.h @@ -7,6 +7,8 @@ #pragma once +#include + #include #include "options.h" @@ -23,6 +25,5 @@ public: const OptionValue &values); private: - static bool parseRole(libcamera::StreamRole *role, - const KeyValueParser::Options &options); + static std::optional parseRole(const KeyValueParser::Options &options); }; -- cgit v1.2.1