Patch Detail
Show a patch.
GET /api/1.1/patches/16241/?format=api
{ "id": 16241, "url": "https://patchwork.libcamera.org/api/1.1/patches/16241/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16241/", "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": "<20220616142403.20723-6-laurent.pinchart@ideasonboard.com>", "date": "2022-06-16T14:24:01", "name": "[libcamera-devel,5/7] libcamera: yaml_parser: Remove memberNames() function", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d5bc6576f569b2dd5099b8c1fb72853d781c44f8", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16241/mbox/", "series": [ { "id": 3181, "url": "https://patchwork.libcamera.org/api/1.1/series/3181/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3181", "date": "2022-06-16T14:23:56", "name": "libcamera: yaml_parser: Add iterator API", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3181/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16241/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16241/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 D653AC3276\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 16 Jun 2022 14:24:27 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 706F165635;\n\tThu, 16 Jun 2022 16:24:26 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D282A65635\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 16 Jun 2022 16:24:21 +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 D97FD415;\n\tThu, 16 Jun 2022 16:24:20 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655389466;\n\tbh=ZttNfuLXQgYgSHWyV79OsPjjYDVeCxtqYKq4DxCSCuo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=L4xGPbGyZnybSTMvNra57qTVPRMIosuEG0GYYgvVV3lEklJxNk+P6v7xIGW1d+wdr\n\t9IHF4KYQ5KTvukaR0T0bI+4UcfSd8h3NZSHUpHy9tvDgZ1pfRvc+NqGZrjc3MBo8c4\n\tXEJkZwamijT7vmFBVyJso79QeoYMf94X9stvifqRqP8KbjrQVHOLKffOV3fiRv8ZkH\n\tM0/PoCJXkz18MHYcboIwdjRFZTASQ9t58Qpi2doNxJrzQgOxppPfA66B0vxbI1zNwO\n\trW8hQXBKFDxXF0xslKVmmaL1Le0OJfi8JI63/3Y2uZrEn9UFn0QiVehOwrpo1W+bEk\n\tg1LDFVOpFmAng==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1655389461;\n\tbh=ZttNfuLXQgYgSHWyV79OsPjjYDVeCxtqYKq4DxCSCuo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=aTyfIj8ZkwG7e20Dwna2k/lk0AyY88eTVIclh6/b2tfFamxMBCTkSwqkuclhWJ5/X\n\tokmk4ymcORzXsPNsIsGkpRNS6v0wAmJ/UTRjyjZlqmR7HBLG5Ex4TBQzRlnqoPkNNg\n\tpwKXZQvV1jZBK79DHZlPFcIf0uMUP0fbAZBVNYVU=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"aTyfIj8Z\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 16 Jun 2022 17:24:01 +0300", "Message-Id": "<20220616142403.20723-6-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220616142403.20723-1-laurent.pinchart@ideasonboard.com>", "References": "<20220616142403.20723-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 5/7] libcamera: yaml_parser: Remove\n\tmemberNames() function", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Now that YamlObject supports iteration, the memberNames() function isn't\nuseful anymore as it can be implemented using utils::map_keys() if\nreally needed. Drop it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/yaml_parser.h | 1 -\n src/libcamera/yaml_parser.cpp | 22 ----------------------\n test/yaml-parser.cpp | 10 ----------\n 3 files changed, 33 deletions(-)", "diff": "diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h\nindex 8edd32354184..811be1affcc0 100644\n--- a/include/libcamera/internal/yaml_parser.h\n+++ b/include/libcamera/internal/yaml_parser.h\n@@ -172,7 +172,6 @@ public:\n \n \tbool contains(const std::string &key) const;\n \tconst YamlObject &operator[](const std::string &key) const;\n-\tstd::vector<std::string> memberNames() const;\n \n private:\n \tLIBCAMERA_DISABLE_COPY_AND_MOVE(YamlObject)\ndiff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp\nindex 4df7e5a33d47..9b6e70cbfcf3 100644\n--- a/src/libcamera/yaml_parser.cpp\n+++ b/src/libcamera/yaml_parser.cpp\n@@ -335,28 +335,6 @@ bool YamlObject::contains(const std::string &key) const\n \treturn true;\n }\n \n-/**\n- * \\fn YamlObject::memberNames()\n- * \\brief Retrieve all member names of the dictionary\n- *\n- * This function retrieve member names of a YamlObject. Only YamlObject\n- * instances of Dictionary type associate elements with names, calling this\n- * function on other types of instances is invalid and results in undefined\n- * behaviour.\n- *\n- * \\todo Replace this function with an iterator-based API\n- *\n- * \\return A vector of string as the member names\n- */\n-std::vector<std::string> YamlObject::memberNames() const\n-{\n-\tstd::vector<std::string> memberNames;\n-\tfor (auto &[key, _] : dictionary_)\n-\t\tmemberNames.push_back(key);\n-\n-\treturn memberNames;\n-}\n-\n /**\n * \\fn YamlObject::operator[](const std::string &key) const\n * \\brief Retrieve a member by name from the dictionary\ndiff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp\nindex ab6e9a01c0fe..38f848232fa6 100644\n--- a/test/yaml-parser.cpp\n+++ b/test/yaml-parser.cpp\n@@ -500,16 +500,6 @@ protected:\n \t\t/* Make sure utils::map_keys() works on the adapter. */\n \t\t(void)utils::map_keys(dictObj.asDict());\n \n-\t\tauto memeberNames = dictObj.memberNames();\n-\t\tsort(memeberNames.begin(), memeberNames.end());\n-\n-\t\tif (memeberNames[0] != \"a\" ||\n-\t\t memeberNames[1] != \"b\" ||\n-\t\t memeberNames[2] != \"c\") {\n-\t\t\tcerr << \"Dictionary object fail to parse member names\" << std::endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n \t\t/* Test leveled objects */\n \t\tauto &level1Obj = (*root)[\"level1\"];\n \n", "prefixes": [ "libcamera-devel", "5/7" ] }