Show a patch.

GET /api/patches/23195/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23195,
    "url": "https://patchwork.libcamera.org/api/patches/23195/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23195/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20250421153556.171192-6-barnabas.pocze@ideasonboard.com>",
    "date": "2025-04-21T15:35:56",
    "name": "[v2,5/5] libcamera: controls: Add rvalue overload for `ControlList::set()`",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "06189b5ed5a04f2bb12008157c0c55a0fe3c5228",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23195/mbox/",
    "series": [
        {
            "id": 5135,
            "url": "https://patchwork.libcamera.org/api/series/5135/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5135",
            "date": "2025-04-21T15:35:51",
            "name": "libcamera: controls: Move constructor/assignment + swap",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5135/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23195/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23195/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 DC1F6C331F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Apr 2025 15:36:10 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9F90C68AD6;\n\tMon, 21 Apr 2025 17:36:08 +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 5BC5168ABA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Apr 2025 17:36:01 +0200 (CEST)",
            "from pb-laptop.local (185.221.143.16.nat.pool.zt.hu\n\t[185.221.143.16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C27036D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Apr 2025 17:33:54 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"RAQezxr4\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745249634;\n\tbh=/HpccjLfFl/rXKy0yW2JbUFdz0Ez1+VbSg6Whi5yDc4=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=RAQezxr4xEKSsmksYmiHOlf5FprRHMMSCpTzA1f/nb4tWyh/LSF5Hqq9evkil1ZMV\n\tip8e3mrWa7SZSs02+KyxQGsxOgV18cPVEOC07taTN4FDCdr95xcvofn4907nkG9cRf\n\thuj2o6iaF4xaVqykobUnlzCOqmvv/wIIqVdaYJ8A=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v2 5/5] libcamera: controls: Add rvalue overload for\n\t`ControlList::set()`",
        "Date": "Mon, 21 Apr 2025 17:35:56 +0200",
        "Message-ID": "<20250421153556.171192-6-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250421153556.171192-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20250421153556.171192-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add an overload of `ControlList::set()` that takes the `ControlValue` argument\nas an rvalue reference, therefore enabling the use of move assignment.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/controls.h |  1 +\n src/libcamera/controls.cpp   | 12 ++++++++++++\n 2 files changed, 13 insertions(+)",
    "diff": "diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 62ee5ebd6..611252f20 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -516,6 +516,7 @@ public:\n \n \tconst ControlValue &get(unsigned int id) const;\n \tvoid set(unsigned int id, const ControlValue &value);\n+\tvoid set(unsigned int id, ControlValue &&value);\n \n \tconst ControlInfoMap *infoMap() const { return infoMap_; }\n \tconst ControlIdMap *idMap() const { return idmap_; }\ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex ae54f8c77..c22c6bdb9 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -1189,6 +1189,18 @@ void ControlList::set(unsigned int id, const ControlValue &value)\n \t*val = value;\n }\n \n+/**\n+ * \\copydoc ControlList::set(unsigned int, const ControlValue &)\n+ */\n+void ControlList::set(unsigned int id, ControlValue &&value)\n+{\n+\tControlValue *val = find(id);\n+\tif (!val)\n+\t\treturn;\n+\n+\t*val = std::move(value);\n+}\n+\n /**\n  * \\fn ControlList::infoMap()\n  * \\brief Retrieve the ControlInfoMap used to construct the ControlList\n",
    "prefixes": [
        "v2",
        "5/5"
    ]
}