From patchwork Thu Apr 23 23:00:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26524 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A1E0BBDCB5 for ; Thu, 23 Apr 2026 23:01:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C406062F60; Fri, 24 Apr 2026 01:01:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="v+or/6WT"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9A79762F57 for ; Fri, 24 Apr 2026 01:01:03 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1AF7434 for ; Fri, 24 Apr 2026 00:59:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1776985164; bh=vqb+V5KiW+iQzA+wKfrOttyEJip+8YUkGI2wXdO0r/4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v+or/6WT7In/fLhwVIQJaZ5Ds3iq+pPf9rvoYz0vEckNyxL1FOJDJQl2vzXp+V1sy qQ3uMlV2WCfPKvY8yOxWvoGQDve3242ganNthB5UyUhLeNbescixSvtTNNNgLM4xAx hJl7rcl98oq4w1gWgSs/U8watV6StHVxSi8fvU2w= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v3 02/37] libcamera: yaml_parser: Use std::make_unique<> Date: Fri, 24 Apr 2026 02:00:24 +0300 Message-ID: <20260423230059.3180987-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423230059.3180987-1-laurent.pinchart@ideasonboard.com> References: <20260423230059.3180987-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 e13b5faedd81..791fb6eeafa8 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)