From patchwork Thu Jun 11 01:17:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26868 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 5749FC3300 for ; Thu, 11 Jun 2026 01:17:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7507061F3F; Thu, 11 Jun 2026 03:17:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EJaP9xDK"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D51E461F14 for ; Thu, 11 Jun 2026 03:17:27 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 48614D0 for ; Thu, 11 Jun 2026 03:16:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140618; bh=YCTHG3GTJm2Qci50lhIR0VnNuFkZFM+BHtyjUP5RWFQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EJaP9xDKUc+9BdFuZR+45O5YJIfr3XwwEk1D4s4QGhF4R93F6wGNPzAezYq1ANd0n LnEJP0iXPvGWQEItvmWT8Gu7DrSFwz0H0rCY9jRB6T94zrPlQ0A2sqU1cS+Ljk2Nj6 ZlODSZzxcjnB+470Pea8YMrZYIkRkuZkXUI38FLk= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 3/6] libcamera: vector: Rename data validation function Date: Thu, 11 Jun 2026 04:17:19 +0300 Message-ID: <20260611011722.1767689-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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 vectorValidateYaml() function predates the refactoring of YamlObject and its rename to ValueNode. It now operates on a ValudeNode, disconnected from the YAML parser. Rename it to vectorValidateValueNode() accordingly. While at it, fold consecutive __DOXYGEN__ conditional blocks into a single one. Signed-off-by: Laurent Pinchart --- include/libcamera/internal/vector.h | 6 ++---- src/libcamera/vector.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h index e3ea723d300c..093efafa8982 100644 --- a/include/libcamera/internal/vector.h +++ b/include/libcamera/internal/vector.h @@ -343,10 +343,8 @@ bool operator!=(const Vector &lhs, const Vector &rhs) } #ifndef __DOXYGEN__ -bool vectorValidateYaml(const ValueNode &obj, unsigned int size); -#endif /* __DOXYGEN__ */ +bool vectorValidateValueNode(const ValueNode &obj, unsigned int size); -#ifndef __DOXYGEN__ template std::ostream &operator<<(std::ostream &out, const Vector &v) { @@ -364,7 +362,7 @@ template struct ValueNode::Accessor> { std::optional> get(const ValueNode &obj) const { - if (!vectorValidateYaml(obj, Rows)) + if (!vectorValidateValueNode(obj, Rows)) return std::nullopt; Vector vector; diff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp index 94fbf61e23ea..d850a581e32b 100644 --- a/src/libcamera/vector.cpp +++ b/src/libcamera/vector.cpp @@ -351,7 +351,7 @@ LOG_DEFINE_CATEGORY(Vector) */ #ifndef __DOXYGEN__ -bool vectorValidateYaml(const ValueNode &obj, unsigned int size) +bool vectorValidateValueNode(const ValueNode &obj, unsigned int size) { if (!obj.isList()) return false;