Show a patch.

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

{
    "id": 22306,
    "url": "https://patchwork.libcamera.org/api/patches/22306/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22306/",
    "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": "<20241213094602.2083174-2-naush@raspberrypi.com>",
    "date": "2024-12-13T09:38:24",
    "name": "[1/6] ipa: rpi: Use r-value references in the set()/setLocked() functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5244863f5e8e38675c2621311675f2a0ec99a487",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22306/mbox/",
    "series": [
        {
            "id": 4881,
            "url": "https://patchwork.libcamera.org/api/series/4881/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4881",
            "date": "2024-12-13T09:38:23",
            "name": "Raspberry Pi: Various changes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4881/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22306/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22306/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 3E048C32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Dec 2024 09:46:16 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E64667EEE;\n\tFri, 13 Dec 2024 10:46:12 +0100 (CET)",
            "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5D16667EE0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Dec 2024 10:46:09 +0100 (CET)",
            "by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-436203f1203so1621075e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Dec 2024 01:46:09 -0800 (PST)",
            "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4362557c502sm43989105e9.11.2024.12.13.01.46.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Dec 2024 01:46:08 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"S5WwIcMZ\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1734083169; x=1734687969;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=idQKCBHzbaC+BEg4JRAyp9O26UUUljmI2CnjLqe3ocU=;\n\tb=S5WwIcMZ/WvWBi0DlAXcXbO0DoXwYC/zjrYKEwfnp9kwRkgnGkIw+ZYSLcYVGt8BHa\n\tjK4AtyIulpaVxn7ba08u5dzb05cRptsygobwcDRX9Yzo0d8ttsc7gC7Q6BHmV+9McI1p\n\tiaKRTfSMLHDGZEA35AVIc7z5HOoQhfW/P2nUeuKG0tK3jL5rNH7Ua5oyx0dANoduEEV9\n\tjFsihPOuN5CgKr6heAEC+4u9py0kGHSSQzdh6VsRBXgd0ZqPGeeJ+pgjCi6AKSsUaQ+K\n\to//Dqi/uflApvXOagcSffp06lB/Qmg0j/F1lSkmd2Y0TZnEhUthj80L4B6CQlEGJl4Sr\n\twTew==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1734083169; x=1734687969;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=idQKCBHzbaC+BEg4JRAyp9O26UUUljmI2CnjLqe3ocU=;\n\tb=d396kiqPVO9FUde1VkoZAAsLg1GLp5M5medeOfwkgd9QS1RGoW35WPjiY9axquCzwP\n\tFc8+2FNwtaGetT2ZJp+YH3bhiRlwhe7DUtdjIS34XfgR9zRvDQ4P8RMzpslM7C4X9eWG\n\tWvWog15yvCSLvFLjSWcw+FK+oAWvRZr8ofzF3Scn8RlZoPPGNvCVkxMkz9uxWAK5UDhj\n\tNN8GQfVojgFdEbZzZbFxZ9Mwr9/T9gbzj2Sh7lYpTw5aihoUuwTx+fy1N/ebbEf65vY/\n\tdqt9QvNKs+0c4AtL3GKQ1Xj7rumzuYcknJp09XZ7WVLLyUUm6dl9aK8Oiueen6LQ4P3x\n\t78vw==",
        "X-Gm-Message-State": "AOJu0YxJo6hiHo5y5eAGb/3iHc48QDnw0bCGEDKs1Px41e71gIRA9Aek\n\tXTSWHbmTWkDNrIC34NIyStDEScJN/0ham7I+v89t0hByaM9lAZGdktXYhR4ThVOCWoV1w41wF15\n\tO",
        "X-Gm-Gg": "ASbGnctnLCiYLw5kr9KtD+G3RHaF+KZNj/GCnHR6fOAUt+3eNmUQsetDQxCP4ONcEGi\n\tWDvUNN5fiUPKX1OAvMMosyMPFeIEHEmm/fbqS76tpQNkUCe3rA0xOFGUrdAITTMA9+kikqleySN\n\ti6ehrYNUdNM2W3Cogjj4+OqbR9PDVDhbATT/5EUISl+szyR0w4mJxjUYGwLPO8Z0xp9e40wil+g\n\t0SHT9hTH2ATyXuudJgqHpMT/vrT/GMLr00xNMPPJiDc07S/S7/REghEjgOv5ZpkCuB74n6WZWxD",
        "X-Google-Smtp-Source": "AGHT+IGZ2z8x2ufql5/63tDeg2CinB4a0Tr85AlsCnMvmlnYHu8EbMToaH4n6n1gTAC0piI10yFw5g==",
        "X-Received": "by 2002:a05:600c:4ed3:b0:42c:c0d8:bf49 with SMTP id\n\t5b1f17b1804b1-4362a9895eemr5579675e9.0.1734083168635; \n\tFri, 13 Dec 2024 01:46:08 -0800 (PST)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH 1/6] ipa: rpi: Use r-value references in the\n\tset()/setLocked() functions",
        "Date": "Fri, 13 Dec 2024 09:38:24 +0000",
        "Message-ID": "<20241213094602.2083174-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20241213094602.2083174-1-naush@raspberrypi.com>",
        "References": "<20241213094602.2083174-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "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 an r-value reference in set() and setLocked(), allowing more\nefficient metadata handling with std::forward and std::move if needed.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/controller/metadata.h | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/ipa/rpi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h\nindex b4650d25170f..eda4b59bca9a 100644\n--- a/src/ipa/rpi/controller/metadata.h\n+++ b/src/ipa/rpi/controller/metadata.h\n@@ -36,10 +36,10 @@ public:\n \t}\n \n \ttemplate<typename T>\n-\tvoid set(std::string const &tag, T const &value)\n+\tvoid set(std::string const &tag, T &&value)\n \t{\n \t\tstd::scoped_lock lock(mutex_);\n-\t\tdata_[tag] = value;\n+\t\tdata_[tag] = std::forward<T>(value);\n \t}\n \n \ttemplate<typename T>\n@@ -104,10 +104,10 @@ public:\n \t}\n \n \ttemplate<typename T>\n-\tvoid setLocked(std::string const &tag, T const &value)\n+\tvoid setLocked(std::string const &tag, T &&value)\n \t{\n \t\t/* Use this only if you're holding the lock yourself. */\n-\t\tdata_[tag] = value;\n+\t\tdata_[tag] = std::forward<T>(value);\n \t}\n \n \t/*\n",
    "prefixes": [
        "1/6"
    ]
}