From patchwork Thu Jun 13 01:39:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20276 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 DB22DC3237 for ; Thu, 13 Jun 2024 01:40:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 749F26548E; Thu, 13 Jun 2024 03:40:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="et9LEaXA"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DC2F46548D for ; Thu, 13 Jun 2024 03:40:10 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C8D1BEB; Thu, 13 Jun 2024 03:39:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718242796; bh=6+WxV82SCc7NA/PAiPvjRQwCUTImjbjizgdBq9+JBQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=et9LEaXAy9YvB70BWQZFoAZLFyH9GHZiof+UtL6mvBEeCsv/YBG6aD4q9zbgivKW1 HUKy++Gaam6AA0ywEfZGh4GswXGpLX415/NGF0sBzHzV6mz/LZl6v/S0Nwk9RpUtGf FD0As9FfXOtCYyMGlOS9twuJSs0I+Yu+1Nw8/h+A= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , David Plowman , Naushir Patuck Subject: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function Date: Thu, 13 Jun 2024 04:39:37 +0300 Message-ID: <20240613013944.23344-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240613013944.23344-1-laurent.pinchart@ideasonboard.com> References: <20240613013944.23344-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" Now that YAML deserialization of Vector instances is supported through YamlObject::get(), remove the Vector::readYaml() function. It turns out not be used. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/ipa/libipa/vector.cpp | 13 ------------- src/ipa/libipa/vector.h | 23 ----------------------- 2 files changed, 36 deletions(-) diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp index 4e987d82fa70..b071b261b9c4 100644 --- a/src/ipa/libipa/vector.cpp +++ b/src/ipa/libipa/vector.cpp @@ -40,19 +40,6 @@ namespace ipa { * The size of \a data must be equal to the dimension size Rows of the vector. */ -/** - * \fn Vector::readYaml - * \brief Populate the vector with yaml data - * \param yaml Yaml data to populate the vector with - * - * Any existing data in the vector will be overwritten. The size of the data - * read from \a yaml must be equal to the dimension size Rows of the vector. - * - * The yaml data is expected to be a list with elements of type T. - * - * \return 0 on success, negative error code otherwise - */ - /** * \fn T Vector::operator[](size_t i) const * \brief Index to an element in the vector diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h index 4b2fe581ecc2..2a2906202ce4 100644 --- a/src/ipa/libipa/vector.h +++ b/src/ipa/libipa/vector.h @@ -39,29 +39,6 @@ public: data_[i] = data[i]; } - int readYaml(const libcamera::YamlObject &yaml) - { - if (yaml.size() != Rows) { - LOG(Vector, Error) - << "Wrong number of values in vector: expected " - << Rows << ", got " << yaml.size(); - return -EINVAL; - } - - unsigned int i = 0; - for (const auto &x : yaml.asList()) { - auto value = x.get(); - if (!value) { - LOG(Vector, Error) << "Failed to read vector value"; - return -EINVAL; - } - - data_[i++] = *value; - } - - return 0; - } - const T &operator[](size_t i) const { ASSERT(i < data_.size());