From patchwork Sat Jul 25 14:40:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9003 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 E54A4BD86F for ; Sat, 25 Jul 2020 14:37:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C0D62613AA; Sat, 25 Jul 2020 16:37:31 +0200 (CEST) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 87E51611A2 for ; Sat, 25 Jul 2020 16:37:28 +0200 (CEST) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id D39A1240004; Sat, 25 Jul 2020 14:37:27 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sat, 25 Jul 2020 16:40:55 +0200 Message-Id: <20200725144058.129388-4-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200725144058.129388-1-jacopo@jmondi.org> References: <20200725144058.129388-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/6] andrdid: camera_device: Store const templates 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" The request capture templates stored in the CameraDevice::requestTemplates_ should not be modified once created. Store a const pointer to the request templates in the class member map. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/android/camera_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 5b8b9c3e26e2..af1b58ab6b4e 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -95,7 +95,7 @@ private: std::unique_ptr config_; CameraMetadata *staticMetadata_; - std::map requestTemplates_; + std::map requestTemplates_; const camera3_callback_ops_t *callbacks_; std::vector streamConfigurations_;