diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2023-02-13 16:43:06 +0000 |
---|---|---|
committer | Umang Jain <umang.jain@ideasonboard.com> | 2023-02-15 01:32:05 +0530 |
commit | 58e0b6e18c425072a47594f42fc0b61801403aca (patch) | |
tree | 2309b5980b1073117ad4f7ea5d996a47237342e8 /src/apps/common/stream_options.h | |
parent | 02f0492c55f293b6a00ee702cee51b5f1b1c2e50 (diff) |
apps: Return std::optional<> from StreamKeyValueParser::parseRole()
Instead of having bool return type and an out parameter, use
std::optional<libcamera::StreamRole> to return from
StreamKeyValueParser::parseRole().
Meanwhile at it, re-word an existing comment to make it lucid.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/apps/common/stream_options.h')
-rw-r--r-- | src/apps/common/stream_options.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 <optional> + #include <libcamera/camera.h> #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<libcamera::StreamRole> parseRole(const KeyValueParser::Options &options); }; |