Show a patch.

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

{
    "id": 9966,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/9966/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9966/",
    "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": "<20201006090731.185060-1-naush@raspberrypi.com>",
    "date": "2020-10-06T09:07:31",
    "name": "[libcamera-devel] pipeline: ipa: raspberrypi: Switch to use C++17 features where possible",
    "commit_ref": "bb6167873ee309da12ed71c7943d54823e4b6709",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5ec6e1de3f5aa9bf95fd7bde1fa585eb13af36c1",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9966/mbox/",
    "series": [
        {
            "id": 1353,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1353/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1353",
            "date": "2020-10-06T09:07:31",
            "name": "[libcamera-devel] pipeline: ipa: raspberrypi: Switch to use C++17 features where possible",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1353/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9966/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9966/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 4A48ABEEE0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Oct 2020 09:07:38 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 706AA6035A;\n\tTue,  6 Oct 2020 11:07:37 +0200 (CEST)",
            "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D28D96035A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Oct 2020 11:07:35 +0200 (CEST)",
            "by mail-wm1-x32e.google.com with SMTP id l11so2124629wmh.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Oct 2020 02:07:35 -0700 (PDT)",
            "from naushir-VirtualBox.pitowers.org\n\t([2a00:1098:3142:14:a00:27ff:fe4d:f6a2])\n\tby smtp.gmail.com with ESMTPSA id\n\tj14sm3579355wrr.66.2020.10.06.02.07.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Oct 2020 02:07:34 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"fTuZch0D\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=PP7OPwHeV1v3XuIVe104KTrxEfSqUbuIwA3UmJpwTVE=;\n\tb=fTuZch0D2kjfnHx8+Wce8s65YQ1UL02eKA7g7xQmYISMQaYGLlIC4vpDonXX1iQguK\n\tipZFzltXS0mOT2dVlAXCWO+ulP/uI/o7AOn3mVpFroO+EOTBbYR4K6S5us3Tl+JAK8B4\n\t3KIfTsOwDe/bDIlRRPZSdx94M73HQwGB0yuBfGDApLDNOqq48G7u6dxTHY9e8v2QtEu7\n\t8vmKtpU3FdLWyHqaYZXLclyj8owiSg/GEKwKnvNzu8FCdgmQq5ZUTlNOIgEa3rtan5xj\n\taJocsvjcWtIFXVuvnbVSiEvqV2USN7I4S5GOBydMfznG4RIybGABYtabnK3No7I/YGCr\n\tchkg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=PP7OPwHeV1v3XuIVe104KTrxEfSqUbuIwA3UmJpwTVE=;\n\tb=IUMs3wefRdqSTo2iAkI/0AjUDttsXlylBzyfqzKHdginjmtRjOHKdtfde4WmSP7nRG\n\tovx5qiRrgJ3wTK5sZKEjqTOhU6ZcSC7gpXNr6Z5qkU8wtHkke3YCy3FXaWhxepCe0Kc7\n\tU00f0CaZ4oxUVjr2H30DT8Y9LlqMGFMaWPmRLOSVZ+Mdti8tNbUz3g/1apVUYV70TUhq\n\tACVgtF1gdaSZTCJL3cMjXY9x9MZx8by2ugU1mVrzyJXR8S+KBLeVmVCSvblpW8DnClhh\n\tbX5ruebpXqbKAsPZKeYnCBaOqjmItCjOqRu6oiOb6GQzhj8qUmbicl9AGqICYLW9VFpv\n\tgRSw==",
        "X-Gm-Message-State": "AOAM533P2YEMeorH2DIxPfeyXLi7GWRFFbqhiIzu4bzGDBdEA+IPYhGQ\n\tILwAKbzrBjpd5KKqGlvcMRiBxaxVKGT8lg==",
        "X-Google-Smtp-Source": "ABdhPJx3hIb+LhFNwaUsP7+XJxJR/7xxoCEL7dgq+6oyJ0Omh8aKp1nWYj7U7Hlv0iYaIOzSV+eukg==",
        "X-Received": "by 2002:a1c:c28a:: with SMTP id\n\ts132mr3874539wmf.13.1601975255025; \n\tTue, 06 Oct 2020 02:07:35 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  6 Oct 2020 10:07:31 +0100",
        "Message-Id": "<20201006090731.185060-1-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] pipeline: ipa: raspberrypi: Switch to use\n\tC++17 features where possible",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "With the recent change to use C++17, the following code changes can be\nmade:\n- Use C++17 [[fallthough]] attribute instead of /* Fall through */.\n- Swap boost::any to std::any.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/metadata.hpp        | 9 ++++-----\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n 2 files changed, 5 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/metadata.hpp b/src/ipa/raspberrypi/controller/metadata.hpp\nindex f3a8dfab..4f44ffc6 100644\n--- a/src/ipa/raspberrypi/controller/metadata.hpp\n+++ b/src/ipa/raspberrypi/controller/metadata.hpp\n@@ -8,13 +8,12 @@\n \n // A simple class for carrying arbitrary metadata, for example about an image.\n \n+#include <any>\n #include <string>\n #include <mutex>\n #include <map>\n #include <memory>\n \n-#include <boost/any.hpp>\n-\n namespace RPiController {\n \n class Metadata\n@@ -31,7 +30,7 @@ public:\n \t\tauto it = data_.find(tag);\n \t\tif (it == data_.end())\n \t\t\treturn -1;\n-\t\tvalue = boost::any_cast<T>(it->second);\n+\t\tvalue = std::any_cast<T>(it->second);\n \t\treturn 0;\n \t}\n \tvoid Clear()\n@@ -53,7 +52,7 @@ public:\n \t\tauto it = data_.find(tag);\n \t\tif (it == data_.end())\n \t\t\treturn nullptr;\n-\t\treturn boost::any_cast<T>(&it->second);\n+\t\treturn std::any_cast<T>(&it->second);\n \t}\n \ttemplate<typename T>\n \tvoid SetLocked(std::string const &tag, T const &value)\n@@ -69,7 +68,7 @@ public:\n \n private:\n \tmutable std::mutex mutex_;\n-\tstd::map<std::string, boost::any> data_;\n+\tstd::map<std::string, std::any> data_;\n };\n \n typedef std::shared_ptr<Metadata> MetadataPtr;\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 1052bdce..26dbd257 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1494,7 +1494,7 @@ void RPiCameraData::handleState()\n \t\t * No break here, we want to try running the pipeline again.\n \t\t * The fallthrough clause below suppresses compiler warnings.\n \t\t */\n-\t\t/* Fall through */\n+\t\t[[fallthrough]];\n \n \tcase State::Idle:\n \t\ttryRunPipeline();\n",
    "prefixes": [
        "libcamera-devel"
    ]
}