Patch Detail
Show a patch.
GET /api/patches/16034/?format=api
{ "id": 16034, "url": "https://patchwork.libcamera.org/api/patches/16034/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16034/", "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": "<20220524225816.6830-9-laurent.pinchart@ideasonboard.com>", "date": "2022-05-24T22:58:12", "name": "[libcamera-devel,RFC,08/12] libcamera: yaml_parser: Remove memberNames() function", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1fa4b881c13cd164d7dc8a7774f26f73b451d446", "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/16034/mbox/", "series": [ { "id": 3135, "url": "https://patchwork.libcamera.org/api/series/3135/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3135", "date": "2022-05-24T22:58:04", "name": "Replace boost JSON parser with libyaml in Raspberry Pi IPA", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3135/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16034/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16034/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 37F81C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 May 2022 22:58:37 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA88D6567B;\n\tWed, 25 May 2022 00:58:36 +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 4BD6465672\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 May 2022 00:58:29 +0200 (CEST)", "from pendragon.ideasonboard.com (ip-109-40-241-133.web.vodafone.de\n\t[109.40.241.133])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BDA001051;\n\tWed, 25 May 2022 00:58:28 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653433116;\n\tbh=2nQl4KS4/oBh2PeoCRVpWrYuo4qMue8+OMbQmS8DqUY=;\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=u/cMl7QobJv9BkB+wA2ly7gAnxzblotbpgocw3FccHz41q1yDkcbnpgencl6OQd+x\n\t2xX3C88EZvhVezUnB/Zh6n+MCmXS4TdokZvYZoTdTMstJkOvQtU4q4JHEN0gQH4Aqq\n\tt/bCryYGlMB2O3yBVsJcUvoxjAPEZisH+iiCTTp6SK8lO3Bmwy3p5F4k+FFooq58P0\n\tryUSlYMXr0+5ZHjpd6Fw1EAX4yyE0SIGtVm4JqAZ0U9j2n8+0uJenULUsHGxf0JNNA\n\tR5Jtwm0YbXOwKnmxuzQ0e5o/Oj0hz/d69pcToJ1qJvuf4n+PHfNn6QFMZHdouRkLZE\n\tCGL+WcVIwDngw==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653433109;\n\tbh=2nQl4KS4/oBh2PeoCRVpWrYuo4qMue8+OMbQmS8DqUY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ZOQXJBmTMP5EPdgLZtgoJUi60qSDkLy4YK8DDXi758AQgW1/heiEyQuwBlPW00SM2\n\tSmCdhdC0m/2R0z2f2U/EUSKPz8Hx/UVQKWHQbkILEiNl1i4IRv8ZmZmJP794kyAT7K\n\tcJGwki2pHSeQrD/Bgqx6G8OdTvUg5TkLe1J4uC8M=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ZOQXJBmT\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 25 May 2022 01:58:12 +0300", "Message-Id": "<20220524225816.6830-9-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220524225816.6830-1-laurent.pinchart@ideasonboard.com>", "References": "<20220524225816.6830-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH 08/12] 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 22ed87efdf8f..79537ff2ea7c 100644\n--- a/include/libcamera/internal/yaml_parser.h\n+++ b/include/libcamera/internal/yaml_parser.h\n@@ -170,7 +170,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 a156df36e222..65b9a9097375 100644\n--- a/src/libcamera/yaml_parser.cpp\n+++ b/src/libcamera/yaml_parser.cpp\n@@ -333,28 +333,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 7ad9936bb82b..3662e7144dfd 100644\n--- a/test/yaml-parser.cpp\n+++ b/test/yaml-parser.cpp\n@@ -488,16 +488,6 @@ protected:\n \t\t\ti++;\n \t\t}\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", "RFC", "08/12" ] }