Patch Detail
Show a patch.
GET /api/1.1/patches/17511/?format=api
{ "id": 17511, "url": "https://patchwork.libcamera.org/api/1.1/patches/17511/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17511/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20221003212128.32429-2-laurent.pinchart@ideasonboard.com>", "date": "2022-10-03T21:21:21", "name": "[libcamera-devel,1/8] ipa: camera_sensor_helper: Make factory createInstance() function const", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "8e5bbbd71f03b04b478e0faae581869b50684154", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17511/mbox/", "series": [ { "id": 3528, "url": "https://patchwork.libcamera.org/api/1.1/series/3528/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3528", "date": "2022-10-03T21:21:20", "name": "libcamera: Use class templates for auto-registration", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3528/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17511/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17511/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DAA0BC327C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 3 Oct 2022 21:21:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 96B0C601D0;\n\tMon, 3 Oct 2022 23:21:35 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E54E601CD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Oct 2022 23:21:33 +0200 (CEST)", "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E3C8C440\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Oct 2022 23:21:32 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664832095;\n\tbh=P9y3UMgZ4IJhFKqKTFUxi/rvpJp6ryIoDA6yp7h1+w8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=gewhZMmahmp5TKQ07LS4imNtt7xKy6X6nyYM+yYcTJITJr08gv7IfjvcvtiICB/Wf\n\tvD2PwPigV/zT0BpPMiqzUrfin8j1Z6t2hZWNHTBIUiNUYwqFjRKMtNqSX5/WVTzQFX\n\t7aWxy4Jj/RIRSPUOYFKKZmRWddYFwwEhA07zXPHddY72WTx6xc8msBn7iLhRsObNGg\n\tAqVguGqUlwgCOmtg9VH3RWrcWYkHzEgLqTHon3kpE+pRy4sRISJtx2tvFPICheft0E\n\te7iAWljiJKvaBapoz65lnxVv64yuk4QzP/VUbNCrwzzjYIE0Fz4rIvPZIAJlgLjH2w\n\tqAAwviqAgPn6w==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664832093;\n\tbh=P9y3UMgZ4IJhFKqKTFUxi/rvpJp6ryIoDA6yp7h1+w8=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=uv223wU3tdLoCPVg8D/aViArPS35zr25d9ISBGOe/VdiisrjJAk3NcDMWva73chwF\n\t7+OTsj1ChidXAaLedH2i66ESSgPMtt6ThuAy6sPD2uV0c4YMspvP1yFOiqovVSmeKn\n\tW0cKUYpvAZGgpX4PdQ+/4Uwrevs4ZkN+6hdibWT8=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"uv223wU3\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 4 Oct 2022 00:21:21 +0300", "Message-Id": "<20221003212128.32429-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20221003212128.32429-1-laurent.pinchart@ideasonboard.com>", "References": "<20221003212128.32429-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/8] ipa: camera_sensor_helper: Make\n\tfactory createInstance() function const", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The CameraSensorHelperFactory::createIsntace() function has no need to\nmodify the factory instance. Make it const.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/libipa/camera_sensor_helper.cpp | 6 +++---\n src/ipa/libipa/camera_sensor_helper.h | 4 ++--\n 2 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\nindex d4dba4975e17..fde9bf5b8892 100644\n--- a/src/ipa/libipa/camera_sensor_helper.cpp\n+++ b/src/ipa/libipa/camera_sensor_helper.cpp\n@@ -254,10 +254,10 @@ CameraSensorHelperFactory::CameraSensorHelperFactory(const std::string name)\n */\n std::unique_ptr<CameraSensorHelper> CameraSensorHelperFactory::create(const std::string &name)\n {\n-\tstd::vector<CameraSensorHelperFactory *> &factories =\n+\tconst std::vector<CameraSensorHelperFactory *> &factories =\n \t\tCameraSensorHelperFactory::factories();\n \n-\tfor (CameraSensorHelperFactory *factory : factories) {\n+\tfor (const CameraSensorHelperFactory *factory : factories) {\n \t\tif (name != factory->name_)\n \t\t\tcontinue;\n \n@@ -299,7 +299,7 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n }\n \n /**\n- * \\fn CameraSensorHelperFactory::createInstance()\n+ * \\fn CameraSensorHelperFactory::createInstance() const\n * \\brief Create an instance of the CameraSensorHelper corresponding to the\n * factory\n *\ndiff --git a/src/ipa/libipa/camera_sensor_helper.h b/src/ipa/libipa/camera_sensor_helper.h\nindex 7351fc7c2928..2042847f29e8 100644\n--- a/src/ipa/libipa/camera_sensor_helper.h\n+++ b/src/ipa/libipa/camera_sensor_helper.h\n@@ -70,7 +70,7 @@ public:\n \tstatic std::vector<CameraSensorHelperFactory *> &factories();\n \n protected:\n-\tvirtual CameraSensorHelper *createInstance() = 0;\n+\tvirtual CameraSensorHelper *createInstance() const = 0;\n \n private:\n \tLIBCAMERA_DISABLE_COPY_AND_MOVE(CameraSensorHelperFactory)\n@@ -85,7 +85,7 @@ public: \t\t\t\t\t\t\t\\\n \thelper##Factory() : CameraSensorHelperFactory(name) {}\t\\\n \t\t\t\t\t\t\t\t\\\n private:\t\t\t\t\t\t\t\\\n-\tCameraSensorHelper *createInstance()\t\t\t\\\n+\tCameraSensorHelper *createInstance() const\t\t\\\n \t{\t\t\t\t\t\t\t\\\n \t\treturn new helper();\t\t\t\t\\\n \t}\t\t\t\t\t\t\t\\\n", "prefixes": [ "libcamera-devel", "1/8" ] }