From 01f5db95591f58d8a9144f160711f35f5f62b400 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 15 Oct 2025 17:14:47 +0300 Subject: [PATCH] libcamera: yaml_parser: Use std::make_unique<> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The YamlParser::parse() function constructs a std::unique_ptr<> instance with a manual call to operator new. Replace it with std::make_unique<>. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze Reviewed-by: Stefan Klug --- src/libcamera/yaml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp index e13b5fae..791fb6ee 100644 --- a/src/libcamera/yaml_parser.cpp +++ b/src/libcamera/yaml_parser.cpp @@ -769,7 +769,7 @@ std::unique_ptr YamlParser::parse(File &file) if (context.init(file)) return nullptr; - std::unique_ptr root(new YamlObject()); + std::unique_ptr root = std::make_unique(); if (context.parseContent(*root)) { LOG(YamlParser, Error)