Show a patch.

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

{
    "id": 23068,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23068/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23068/",
    "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": "<20250328095223.26966-1-barnabas.pocze@ideasonboard.com>",
    "date": "2025-03-28T09:52:23",
    "name": "[v1] libcamera: base: object: Forward arguments when invoking",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "15b59074ab49d79de0be6acbe038ca388c1a06e8",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/1.1/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23068/mbox/",
    "series": [
        {
            "id": 5091,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5091/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5091",
            "date": "2025-03-28T09:52:23",
            "name": "[v1] libcamera: base: object: Forward arguments when invoking",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5091/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23068/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23068/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 0CAC3C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Mar 2025 09:52:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CF92968979;\n\tFri, 28 Mar 2025 10:52:28 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2B33F61868\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Mar 2025 10:52:27 +0100 (CET)",
            "from pb-laptop.local (185.221.143.221.nat.pool.zt.hu\n\t[185.221.143.221])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C3379752\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Mar 2025 10:50:37 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"FvGy/ar2\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743155437;\n\tbh=TFKFtC35zPTsPF1vKiOdl9XzqfZUlAI43p7F2pH+AcQ=;\n\th=From:To:Subject:Date:From;\n\tb=FvGy/ar2KyVu4jp02c+R0IZCxI98uOTCyd8qDmoADIC1wgF53pqnHJes17jC7K/UK\n\tlX1q4aCav08Q037OloL/Yyh7stKubAIog0Bt9zTcxXR5EhM3nkbDnIk7Lt2WFzjKuz\n\tF0EDRuaLgx0sUdMDm45UT3aa0mua2tpocWZd4SgU=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v1] libcamera: base: object: Forward arguments when invoking",
        "Date": "Fri, 28 Mar 2025 10:52:23 +0100",
        "Message-ID": "<20250328095223.26966-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "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": "Use `std::forward()` to forward the received arguments to enable the\npotential use of move constructors instead of copy constructors.\n\nCommit 0eacde623bb0 (\"libcamera: object: Avoid argument copies in invokeMethod()\")\nadded the forwarding references to `invokeMethod()` but it did not add the\nappropriate `std::forward()` calls, so copying could still took place\neven if not necessary.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/base/object.h | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/libcamera/base/object.h b/include/libcamera/base/object.h\nindex 6cb935a04..a24f84ff9 100644\n--- a/include/libcamera/base/object.h\n+++ b/include/libcamera/base/object.h\n@@ -9,6 +9,7 @@\n \n #include <list>\n #include <memory>\n+#include <utility>\n #include <vector>\n \n #include <libcamera/base/bound_method.h>\n@@ -39,7 +40,7 @@ public:\n \t{\n \t\tT *obj = static_cast<T *>(this);\n \t\tauto *method = new BoundMethodMember<T, R, FuncArgs...>(obj, this, func, type);\n-\t\treturn method->activate(args..., true);\n+\t\treturn method->activate(std::forward<Args>(args)..., true);\n \t}\n \n \tThread *thread() const { return thread_; }\n",
    "prefixes": [
        "v1"
    ]
}