From patchwork Mon Jan 20 17:38:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2712 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DD2C960455 for ; Mon, 20 Jan 2020 18:38:20 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 56CF9A62 for ; Mon, 20 Jan 2020 18:38:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1579541900; bh=79dxV6Y0Z4E+AqPe8otzXgXxw24tFo3sHWVFN+ypC50=; h=From:To:Subject:Date:From; b=SgvnSB3t3vuXj0k5lbtWuz3Elqu66mkmvN7ESjhBZdrXJdsZTOEXyCpD0CRQXG9rk LTxogsLihK9hnoYhvPMDkRtdFHwZafEyPiuIbLVAg+8z59hgIDxP6QuGhIALqVKQmF s2UNv+yU6OhUVaK6Wihy42nn9eI0E2Bssfmc+Zdc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Jan 2020 19:38:13 +0200 Message-Id: <20200120173816.31829-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Use std::array where applicable 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: , X-List-Received-Date: Mon, 20 Jan 2020 17:38:21 -0000 Hello, This patch series extends the previously posted "[PATCH 05/19] libcamera: Replace ARRAY_SIZE with std::array" with a utils::make_array() helper function. As pointed out during review, having to manually specify the std::array size for const arrays is not only tedious, but is also error-prone as the array can be declared as larger than the initializer list without any warning from the compiler. To fix this, patch 1/3 introduces utils::make_array(), borrowed from the experimental std::make_array() function. Patch 2/3 uses the new helper where applicable, and patch 3/3 is a rebased version of the previously posted ARRAY_SIZE removal patch based on utils::make_array(). Laurent Pinchart (3): libcamera: utils: Add a new make_array() function libcamera: Use utils::make_array() libcamera: Replace ARRAY_SIZE with std::array Documentation/Doxyfile.in | 1 + src/libcamera/camera.cpp | 13 +++---- src/libcamera/include/utils.h | 44 ++++++++++++++++++++++-- src/libcamera/ipa_module.cpp | 11 +++--- src/libcamera/log.cpp | 23 +++++++------ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 ++-- src/libcamera/pipeline/vimc.cpp | 6 ++-- src/libcamera/stream.cpp | 6 ++-- src/libcamera/utils.cpp | 19 +++++++--- src/libcamera/v4l2_videodevice.cpp | 7 ++-- src/v4l2/v4l2_camera_proxy.cpp | 30 ++++++++-------- test/ipc/unixsocket.cpp | 8 ++--- 12 files changed, 114 insertions(+), 60 deletions(-)