[{"id":39063,"web_url":"https://patchwork.libcamera.org/comment/39063/","msgid":"<ad02619c-43c3-4db3-84b5-8826535b8334@ideasonboard.com>","date":"2026-06-15T08:16:45","subject":"Re: [PATCH 3/6] libcamera: vector: Rename data validation function","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 06. 11. 3:17 keltezéssel, Laurent Pinchart írta:\n> The vectorValidateYaml() function predates the refactoring of YamlObject\n> and its rename to ValueNode. It now operates on a ValudeNode,\n> disconnected from the YAML parser. Rename it to\n> vectorValidateValueNode() accordingly.\n> \n> While at it, fold consecutive __DOXYGEN__ conditional blocks into a\n> single one.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   include/libcamera/internal/vector.h | 6 ++----\n>   src/libcamera/vector.cpp            | 2 +-\n>   2 files changed, 3 insertions(+), 5 deletions(-)\n> \n> diff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h\n> index e3ea723d300c..093efafa8982 100644\n> --- a/include/libcamera/internal/vector.h\n> +++ b/include/libcamera/internal/vector.h\n> @@ -343,10 +343,8 @@ bool operator!=(const Vector<T, Rows> &lhs, const Vector<T, Rows> &rhs)\n>   }\n>   \n>   #ifndef __DOXYGEN__\n> -bool vectorValidateYaml(const ValueNode &obj, unsigned int size);\n> -#endif /* __DOXYGEN__ */\n> +bool vectorValidateValueNode(const ValueNode &obj, unsigned int size);\n>   \n> -#ifndef __DOXYGEN__\n>   template<typename T, unsigned int Rows>\n>   std::ostream &operator<<(std::ostream &out, const Vector<T, Rows> &v)\n>   {\n> @@ -364,7 +362,7 @@ template<typename T, unsigned int Rows>\n>   struct ValueNode::Accessor<Vector<T, Rows>> {\n>   \tstd::optional<Vector<T, Rows>> get(const ValueNode &obj) const\n>   \t{\n> -\t\tif (!vectorValidateYaml(obj, Rows))\n> +\t\tif (!vectorValidateValueNode(obj, Rows))\n>   \t\t\treturn std::nullopt;\n>   \n>   \t\tVector<T, Rows> vector;\n> diff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp\n> index 94fbf61e23ea..d850a581e32b 100644\n> --- a/src/libcamera/vector.cpp\n> +++ b/src/libcamera/vector.cpp\n> @@ -351,7 +351,7 @@ LOG_DEFINE_CATEGORY(Vector)\n>    */\n>   \n>   #ifndef __DOXYGEN__\n> -bool vectorValidateYaml(const ValueNode &obj, unsigned int size)\n> +bool vectorValidateValueNode(const ValueNode &obj, unsigned int size)\n>   {\n>   \tif (!obj.isList())\n>   \t\treturn false;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6C7F7C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Jun 2026 08:16:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F9A3623D7;\n\tMon, 15 Jun 2026 10:16:48 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89A6F623CD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Jun 2026 10:16:46 +0200 (CEST)","from [192.168.33.26] (185.221.142.169.nat.pool.zt.hu\n\t[185.221.142.169])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AB363C77;\n\tMon, 15 Jun 2026 10:16:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"h+w+eEbO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781511374;\n\tbh=zG7aeNGHW6k/NwCQKR24wbFEUVgLioYXs8iUpte6kzo=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=h+w+eEbOoPjaGkrtW2mzp4k96U7OamvtgauP9QthUdPm0q45ByLxtvW/piAp480ew\n\txkUfuAGsFWGdjEd5IiAKbMLrAW5745P53lEXRbv2CUWp2qNdnAr+d102y/YwHC66AZ\n\t0eG6Apxi5xzSB4E6CT7l0mrh1QCuhbWqhxzAZW5A=","Message-ID":"<ad02619c-43c3-4db3-84b5-8826535b8334@ideasonboard.com>","Date":"Mon, 15 Jun 2026 10:16:45 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 3/6] libcamera: vector: Rename data validation function","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260611011722.1767689-1-laurent.pinchart@ideasonboard.com>\n\t<20260611011722.1767689-4-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260611011722.1767689-4-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]