From patchwork Tue Nov 19 10:37:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 21992 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 A8431C326B for ; Tue, 19 Nov 2024 10:38:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 378CA65F02; Tue, 19 Nov 2024 11:38:00 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DMCcURZr"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F0D7F65EFF for ; Tue, 19 Nov 2024 11:37:56 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bf40:cdab:103d:2270]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AC329641; Tue, 19 Nov 2024 11:37:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1732012659; bh=Pxq+QbtgSim5UiVA3GTHPL6TLY8dvp3jcvBt7+Svdmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DMCcURZrriMOADqoy9F+hhfV5RtrSM4tWDPTrj9rj+bAB0N17U+jdpqiLTc3ImuK3 2l3hiX8uI+lIt1zJccZ8t0+LlfFYXLNj15siKUBoyBgprSzimq9UWFYbtXTzwxOpar VcFawyUuWCQjzTQC8lppBZZx9Ox+2435gfp2oibI= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 4/9] libcamera: internal: matrix: Replace vector with array in constructor Date: Tue, 19 Nov 2024 11:37:31 +0100 Message-ID: <20241119103740.1919807-5-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241119103740.1919807-1-stefan.klug@ideasonboard.com> References: <20241119103740.1919807-1-stefan.klug@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" Having an array based constructor gives us initialization via initializer lists. Signed-off-by: Stefan Klug Reviewed-by: Laurent Pinchart --- include/libcamera/internal/matrix.h | 2 +- src/libcamera/matrix.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libcamera/internal/matrix.h b/include/libcamera/internal/matrix.h index 3701d0ee980b..7a71028c473a 100644 --- a/include/libcamera/internal/matrix.h +++ b/include/libcamera/internal/matrix.h @@ -33,7 +33,7 @@ public: data_.fill(static_cast(0)); } - Matrix(const std::vector &data) + Matrix(const std::array &data) { std::copy(data.begin(), data.end(), data_.begin()); } diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp index 55359aa206ee..4d95a19bfbb9 100644 --- a/src/libcamera/matrix.cpp +++ b/src/libcamera/matrix.cpp @@ -32,7 +32,7 @@ LOG_DEFINE_CATEGORY(Matrix) */ /** - * \fn Matrix::Matrix(const std::vector &data) + * \fn Matrix::Matrix(const std::array &data) * \brief Construct a matrix from supplied data * \param[in] data Data from which to construct a matrix *