diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-24 18:29:32 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-06-16 02:43:47 +0300 |
commit | d6d0a675bfe27420d14394ef6b0da5247ea63d87 (patch) | |
tree | ff4e62ad8017165de3bb76925cc7baa0cf97b9c1 /include | |
parent | 27fb47f70b55000fbd793c40377c20d915216f70 (diff) |
libcamera: yaml_parser: Switch from FILE to File
THe FILE object isn't very user-friendly as it requires manual close.
Replace it with File to provide RAII-style resource management in the
YamlParser API.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/yaml_parser.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h index b4f852b1..be5f0914 100644 --- a/include/libcamera/internal/yaml_parser.h +++ b/include/libcamera/internal/yaml_parser.h @@ -7,7 +7,6 @@ #pragma once -#include <cstdio> #include <map> #include <string> #include <vector> @@ -18,6 +17,7 @@ namespace libcamera { +class File; class YamlParserContext; class YamlObject @@ -82,7 +82,7 @@ private: class YamlParser final { public: - static std::unique_ptr<YamlObject> parse(std::FILE *fh); + static std::unique_ptr<YamlObject> parse(File &file); }; } /* namespace libcamera */ |