From patchwork Tue Jul 19 21:02:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16694 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 85533C3274 for ; Tue, 19 Jul 2022 21:03:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3DBA963312; Tue, 19 Jul 2022 23:03:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658264617; bh=u5SY/OnBxRRhzFtdPPAPoIOJg06p67BHMAmDkreXsfQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=DIwTsF8SBTNqjJ6WfH2wCT8CuogxbxOXRBE6FjcivXXZ9DAJCYh4Brh+4A6MuJIqt qwvhC0yhI7p9hQlaQ4w0/Wb0wZ9anPN+G7eb6Eqnu93vEhwpPKCUVlooOYzrWYLbFr 2VUCUe6W72ydfTB/COkd8V0bKeymEa7GL4w5SLQp+lCDiG2yOl0u7ZgRrRncp5vyd0 MsNAbcYCu1ottDxpooRPl1f9AujCpMRA8mduelM1eoS2bnEVM+Rec64YVNq7Rq4mTL 5jLTQfM1gmBKB3MpY92W9ZvyvhBVZWFYwEsefwV4IwfHWibgbd0IN2bRSYCYOAPY7N brxo9cnSX/pOg== 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 945AE603F4 for ; Tue, 19 Jul 2022 23:03:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZHEQ6F64"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 24C66896; Tue, 19 Jul 2022 23:03:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658264615; bh=u5SY/OnBxRRhzFtdPPAPoIOJg06p67BHMAmDkreXsfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZHEQ6F64xjqssLQUn6cd6FhJBuzgIG/u+fhgK+qZDHsWL641feyJALa4M6zZ/Vp8V bOBeG3w860iHv0z98jEvbI0yQ3HOqtSsZ+vhhbYT5qOcPEUBDYHXFRJaLoft7hvc4B 4AU0BcWoCouMF5ucl1d76zVXGB840r4tSJWZwPLM= To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 00:02:58 +0300 Message-Id: <20220719210258.5602-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> References: <20220719210258.5602-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] licamera: controls: Update ControlList::get() documentation 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-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The ControlList::get(const Control &ctrl) function has been modified in commit 1c4d48018505 ("libcamera: controls: Use std::optional to handle invalid control values") to return an std::optional<>, but its documentation wasn't updated. Fix it. Fixes: 1c4d48018505 ("libcamera: controls: Use std::optional to handle invalid control values") Signed-off-by: Laurent Pinchart --- src/libcamera/controls.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 3fd535f204b2..20c27e65e725 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -958,14 +958,8 @@ bool ControlList::contains(unsigned int id) const * \brief Get the value of control \a ctrl * \param[in] ctrl The control * - * The behaviour is undefined if the control \a ctrl is not present in the - * list. Use ControlList::contains() to test for the presence of a control in - * the list before retrieving its value. - * - * The control value type shall match the type T, otherwise the behaviour is - * undefined. - * - * \return The control value + * \return A std::optional containing the control value, or std::nullopt if + * the control \a ctrl is not present in the list */ /**