From patchwork Mon Oct 27 10:53:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24834 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 7C051C32CE for ; Mon, 27 Oct 2025 10:53:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2B4786075B; Mon, 27 Oct 2025 11:53:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EhBYyKcK"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9AFD060707 for ; Mon, 27 Oct 2025 11:53:36 +0100 (CET) Received: from pb-laptop.local (185.182.215.162.nat.pool.zt.hu [185.182.215.162]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C224516AE for ; Mon, 27 Oct 2025 11:51:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761562308; bh=uBKi+OiywSWkN660kQkejMg0ujB6o+5uVleGg4jD5uA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EhBYyKcKoAoAojckRqzSO+MRRPVnxbF0OHcP17pApmAgglrSMGK+sRZeH9WE3IkLT OTKan+RGdmYD5BG1yaajHsSJq5K/BehNQChc035+lKFvmLaUHoOXHywUuBqePBryju 5Nr3XGkdrvHKEiqVUPJ+1VJy8GFF75xQ5JwzGTSc= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 1/2] libcamera: base: utils: Simplify `enumerate()` Date: Mon, 27 Oct 2025 11:53:32 +0100 Message-ID: <20251027105333.103186-2-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027105333.103186-1-barnabas.pocze@ideasonboard.com> References: <20251027105333.103186-1-barnabas.pocze@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" `std::{begin,end}()` support arrays, thus there is no need for a second overload. The only reason it is currently needed is that the trailing return type of the first overload uses `iterable.begin()`, which leads to a substitution failure, so that overload is not considered. So remove the array overload, and let CTAD deduce the `Base` template parameter of `enumerate_adapter`, which will make things work for arrays as well. Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- include/libcamera/base/utils.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h index cb8caaa9ba..d32bd1cd62 100644 --- a/include/libcamera/base/utils.h +++ b/include/libcamera/base/utils.h @@ -355,19 +355,11 @@ private: } /* namespace details */ template -auto enumerate(T &iterable) -> details::enumerate_adapter +auto enumerate(T &iterable) { - return { std::begin(iterable), std::end(iterable) }; + return details::enumerate_adapter{ std::begin(iterable), std::end(iterable) }; } -#ifndef __DOXYGEN__ -template -auto enumerate(T (&iterable)[N]) -> details::enumerate_adapter -{ - return { std::begin(iterable), std::end(iterable) }; -} -#endif - class Duration : public std::chrono::duration { using BaseDuration = std::chrono::duration; From patchwork Mon Oct 27 10:53:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24835 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 2D8F7BE080 for ; Mon, 27 Oct 2025 10:53:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4D7D36075A; Mon, 27 Oct 2025 11:53:41 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="toha45Tc"; 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 B32D360708 for ; Mon, 27 Oct 2025 11:53:36 +0100 (CET) Received: from pb-laptop.local (185.182.215.162.nat.pool.zt.hu [185.182.215.162]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A1101783 for ; Mon, 27 Oct 2025 11:51:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761562309; bh=3KRYIo7gFC01o0DkRxveVeZNguym63a4rYyZK8CncAk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=toha45TcgIb2hJCVVabnf75Tl9pUswtv+VHeuVlLgB9v44t9a2dmxxM9JTuZ4hcSs D6OOD02mmFKP26KRjR3ATFDvH21UX5f/3srq3cKB/9HiK58jGHfl/cAETCsJJbd3Bw nsJbvhrt/CW01XBHxQdIshyAscfjEeRJRqPF2mkY= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 2/2] config: Fix doxygen 1.15.0 errors Date: Mon, 27 Oct 2025 11:53:33 +0100 Message-ID: <20251027105333.103186-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027105333.103186-1-barnabas.pocze@ideasonboard.com> References: <20251027105333.103186-1-barnabas.pocze@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" Some comments use `text' to quote words, but the unbalanced backticks lead doxygen to complain. Fix those by using `text`, also add `%` in front of the words "configuration" and "version" to suppress automatic linking of the quoted text to corresponding member functions. Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/libcamera/global_configuration.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcamera/global_configuration.cpp b/src/libcamera/global_configuration.cpp index 1d6292ef99..e086246d68 100644 --- a/src/libcamera/global_configuration.cpp +++ b/src/libcamera/global_configuration.cpp @@ -37,7 +37,7 @@ LOG_DEFINE_CATEGORY(Configuration) * \brief Support for global libcamera configuration * * The configuration file is a YAML file and the configuration itself is stored - * under a `configuration' top-level item. + * under a `%configuration` top-level item. * * The configuration file is looked up in the user's home directory first and, * if it is not found, then in system-wide configuration directories. If @@ -132,7 +132,7 @@ GlobalConfiguration::GlobalConfiguration() * \brief Retrieve the value of configuration option \a confPath * \tparam T The type of the retrieved configuration value * \param[in] confPath Sequence of the YAML section names (excluding - * `configuration') leading to the requested option + * `%configuration`) leading to the requested option * \return The value of the configuration item corresponding to \a confPath if * it exists in the configuration file, or no value otherwise */ @@ -140,7 +140,7 @@ GlobalConfiguration::GlobalConfiguration() /** * \brief Retrieve the value of configuration option \a confPath * \param[in] confPath Sequence of the YAML section names (excluding - * `configuration') leading to the requested list option, separated by dots + * `%configuration`) leading to the requested list option, separated by dots * \return A vector of strings or no value if not found */ std::optional> GlobalConfiguration::listOption( @@ -219,8 +219,8 @@ std::optional> GlobalConfiguration::envListOption( /** * \brief Retrieve the configuration version * - * The version is declared in the configuration file in the top-level `version' - * element, alongside `configuration'. This has currently no real use but may be + * The version is declared in the configuration file in the top-level `%version` + * element, alongside `%configuration`. This has currently no real use but may be * needed in future if configuration incompatibilities occur. * * \return Configuration version as declared in the configuration file or 0 if @@ -235,7 +235,7 @@ unsigned int GlobalConfiguration::version() const * \brief Retrieve the libcamera global configuration * * This returns the whole configuration stored in the top-level section - * `configuration' of the YAML configuration file. + * `%configuration` of the YAML configuration file. * * The requested part of the configuration can be accessed using \a YamlObject * methods.