Show a patch.

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

{
    "id": 10205,
    "url": "https://patchwork.libcamera.org/api/patches/10205/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10205/",
    "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": "<20201023051021.16389-2-laurent.pinchart@ideasonboard.com>",
    "date": "2020-10-23T05:10:19",
    "name": "[libcamera-devel,1/3] libcamera: media_object: Remove unneeded destructors",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b8680585187f82062ddafe355db837c1b68d07d9",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/10205/mbox/",
    "series": [
        {
            "id": 1405,
            "url": "https://patchwork.libcamera.org/api/series/1405/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1405",
            "date": "2020-10-23T05:10:18",
            "name": "libcamera: Miscellaneous constructors and destructors cleanups",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1405/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10205/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10205/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 175AFBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Oct 2020 05:11:14 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 11EBA615DE;\n\tFri, 23 Oct 2020 07:11:13 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1AC336034E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Oct 2020 07:11:12 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A54C6BB5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Oct 2020 07:11:11 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ZTTQrINX\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1603429871;\n\tbh=t1YFf0l4hNVtGV68VdUV+Xa6JdZXi3pCNKbji1WktNQ=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=ZTTQrINXVB1PMM7rN8a8yVQvk+xH4/NgSu5kUe2+ij3A8Y55DvyZD4I3LJRuBnVW3\n\tWrikQZMdkoZM0YQ0ZB9KrCbPPOTsU0DBQy/pbOAiq2rpIVVBu6FL7Ckii5oj+AbVgh\n\tUY4EBziUGd/BrEysFtZqYjfBO5yd+DGDkMWhSOeQ=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 23 Oct 2020 08:10:19 +0300",
        "Message-Id": "<20201023051021.16389-2-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201023051021.16389-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20201023051021.16389-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 1/3] libcamera: media_object: Remove\n\tunneeded destructors",
        "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": "The MediaEntity, MediaLink and MediaPad classes don't need custom\ndestructors. For MediaEntity and MediaPad, the destructors clear a\nvector embedded in the classes, which will be done by the default\ndestructor. For MediaLink, the destructor is already empty. Remove them.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/media_object.h |  3 ---\n src/libcamera/media_object.cpp            | 18 ------------------\n 2 files changed, 21 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h\nindex be6fb8961349..54311c14895b 100644\n--- a/include/libcamera/internal/media_object.h\n+++ b/include/libcamera/internal/media_object.h\n@@ -51,7 +51,6 @@ private:\n \tMediaLink(const struct media_v2_link *link,\n \t\t  MediaPad *source, MediaPad *sink);\n \tMediaLink(const MediaLink &) = delete;\n-\t~MediaLink() {}\n \n \tMediaPad *source_;\n \tMediaPad *sink_;\n@@ -73,7 +72,6 @@ private:\n \n \tMediaPad(const struct media_v2_pad *pad, MediaEntity *entity);\n \tMediaPad(const MediaPad &) = delete;\n-\t~MediaPad();\n \n \tunsigned int index_;\n \tMediaEntity *entity_;\n@@ -105,7 +103,6 @@ private:\n \tMediaEntity(MediaDevice *dev, const struct media_v2_entity *entity,\n \t\t    unsigned int major = 0, unsigned int minor = 0);\n \tMediaEntity(const MediaEntity &) = delete;\n-\t~MediaEntity();\n \n \tvoid addPad(MediaPad *pad);\n \ndiff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp\nindex b7bf048c985d..056036635902 100644\n--- a/src/libcamera/media_object.cpp\n+++ b/src/libcamera/media_object.cpp\n@@ -191,15 +191,6 @@ MediaPad::MediaPad(const struct media_v2_pad *pad, MediaEntity *entity)\n {\n }\n \n-MediaPad::~MediaPad()\n-{\n-\t/*\n-\t * Don't delete the links as we only borrow the reference owned by\n-\t * MediaDevice.\n-\t */\n-\tlinks_.clear();\n-}\n-\n /**\n  * \\fn MediaPad::index()\n  * \\brief Retrieve the pad index\n@@ -371,15 +362,6 @@ MediaEntity::MediaEntity(MediaDevice *dev,\n {\n }\n \n-MediaEntity::~MediaEntity()\n-{\n-\t/*\n-\t * Don't delete the pads as we only borrow the reference owned by\n-\t * MediaDevice.\n-\t */\n-\tpads_.clear();\n-}\n-\n /**\n  * \\brief Add \\a pad to the entity's list of pads\n  * \\param[in] pad The pad to add to the list\n",
    "prefixes": [
        "libcamera-devel",
        "1/3"
    ]
}