From d6d0a675bfe27420d14394ef6b0da5247ea63d87 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 24 May 2022 18:29:32 +0300 Subject: 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 Reviewed-by: Paul Elder --- include/libcamera/internal/yaml_parser.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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 #include #include #include @@ -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 parse(std::FILE *fh); + static std::unique_ptr parse(File &file); }; } /* namespace libcamera */ -- cgit v1.2.1