Show a patch.

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

{
    "id": 22170,
    "url": "https://patchwork.libcamera.org/api/patches/22170/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22170/",
    "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": "<20241205092258.1058077-1-pobrn@protonmail.com>",
    "date": "2024-12-05T09:23:00",
    "name": "[v2,1/2] libcamera: utils: StringSplitter: Inline some trivial methods",
    "commit_ref": "f1bc9edb46551039e4b8c14e535300ce942bef9b",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "903ae51e6d6c55de91da8a3fe8ab8fd6b27b9503",
    "submitter": {
        "id": 133,
        "url": "https://patchwork.libcamera.org/api/people/133/?format=api",
        "name": "Pőcze Barnabás",
        "email": "pobrn@protonmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22170/mbox/",
    "series": [
        {
            "id": 4848,
            "url": "https://patchwork.libcamera.org/api/series/4848/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4848",
            "date": "2024-12-05T09:23:00",
            "name": "[v2,1/2] libcamera: utils: StringSplitter: Inline some trivial methods",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4848/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22170/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22170/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 78BA7BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Dec 2024 09:23:08 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B3ECD660E4;\n\tThu,  5 Dec 2024 10:23:07 +0100 (CET)",
            "from mail-10630.protonmail.ch (mail-10630.protonmail.ch\n\t[79.135.106.30])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DB52B618B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Dec 2024 10:23:05 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"MHPZAkku\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1733390584; x=1733649784;\n\tbh=/HBCYxzo/mYXXrnROpMGyNTt7kYNk/XpF633OeIROQQ=;\n\th=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:\n\tList-Unsubscribe:List-Unsubscribe-Post;\n\tb=MHPZAkku6DbOlzt2bZFZAgkLKxoRxDoThjYEjqJbVHmWUq8hJLMDxrRW3oLoZwbfT\n\t+WB7aGrFtF//BQ8Mcy4PHjZ4XiMVNpf3F9uCse3V4JrPl2QpfmxB7It+ksyziGx7BC\n\tZGP3gBKEA+fj2uuVuIMz3aPP5qVMSoNBWYkSJYXb6Zalq/2wlxAH05+PxnZFRmVNvA\n\tSZpbKWE7ZOVEBdPEoS+9u6wPZ4JgTo6QrrBNoUfFGNdeUNslfKq61/7eTG3B73a1pd\n\t/uCc6UmzN4diGKylk8g5jLyOCeIT/ZktT2pPOEE+wzqPUc8VJI6AGQp4xCd/pd4YDj\n\tm0OqXnw6OuVKA==",
        "Date": "Thu, 05 Dec 2024 09:23:00 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>",
        "Subject": "[PATCH v2 1/2] libcamera: utils: StringSplitter: Inline some trivial\n\tmethods",
        "Message-ID": "<20241205092258.1058077-1-pobrn@protonmail.com>",
        "Feedback-ID": "20568564:user:proton",
        "X-Pm-Message-ID": "ea303a1fe8ad60eaf8f7ea36f3cac943db67a375",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "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": "Inline some of the more trivial methods so that they can\nbe inlined by the compiler.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n---\n include/libcamera/base/utils.h | 17 ++++++++++++++---\n src/libcamera/base/utils.cpp   | 15 ---------------\n 2 files changed, 14 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h\nindex 957150cb..c4a06660 100644\n--- a/include/libcamera/base/utils.h\n+++ b/include/libcamera/base/utils.h\n@@ -204,7 +204,11 @@ public:\n \n \t\titerator &operator++();\n \t\tstd::string operator*() const;\n-\t\tbool operator!=(const iterator &other) const;\n+\n+\t\tbool operator!=(const iterator &other) const\n+\t\t{\n+\t\t\treturn pos_ != other.pos_;\n+\t\t}\n \n \tprivate:\n \t\tconst StringSplitter *ss_;\n@@ -212,8 +216,15 @@ public:\n \t\tstd::string::size_type next_;\n \t};\n \n-\titerator begin() const;\n-\titerator end() const;\n+\titerator begin() const\n+\t{\n+\t\treturn { this, 0 };\n+\t}\n+\n+\titerator end() const\n+\t{\n+\t\treturn { this, std::string::npos };\n+\t}\n \n private:\n \tstd::string str_;\ndiff --git a/src/libcamera/base/utils.cpp b/src/libcamera/base/utils.cpp\nindex 67e5a896..bcfc1941 100644\n--- a/src/libcamera/base/utils.cpp\n+++ b/src/libcamera/base/utils.cpp\n@@ -276,21 +276,6 @@ std::string details::StringSplitter::iterator::operator*() const\n \treturn ss_->str_.substr(pos_, count);\n }\n \n-bool details::StringSplitter::iterator::operator!=(const details::StringSplitter::iterator &other) const\n-{\n-\treturn pos_ != other.pos_;\n-}\n-\n-details::StringSplitter::iterator details::StringSplitter::begin() const\n-{\n-\treturn iterator(this, 0);\n-}\n-\n-details::StringSplitter::iterator details::StringSplitter::end() const\n-{\n-\treturn iterator(this, std::string::npos);\n-}\n-\n /**\n  * \\fn template<typename Container, typename UnaryOp> \\\n  * std::string utils::join(const Container &items, const std::string &sep, UnaryOp op)\n",
    "prefixes": [
        "v2",
        "1/2"
    ]
}