Patch Detail
Show a patch.
GET /api/1.1/patches/2061/?format=api
{ "id": 2061, "url": "https://patchwork.libcamera.org/api/1.1/patches/2061/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2061/", "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": "<20190929190254.18920-7-laurent.pinchart@ideasonboard.com>", "date": "2019-09-29T19:02:47", "name": "[libcamera-devel,v2,06/13] libcamera: controls: Remove the unused ControlList::update() method", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4d2b11b44672d6275733b8fa2481cde4a6fa5af2", "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/2061/mbox/", "series": [ { "id": 512, "url": "https://patchwork.libcamera.org/api/1.1/series/512/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=512", "date": "2019-09-29T19:02:41", "name": "Improve the application-facing controls API", "version": 2, "mbox": "https://patchwork.libcamera.org/series/512/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2061/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2061/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "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 5DB0B6191C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 29 Sep 2019 21:03:13 +0200 (CEST)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F040F320\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 29 Sep 2019 21:03:12 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1569783793;\n\tbh=2NrNo8KQ7Wfni7wSOayjhItbOtGwdOr4gfL9KiZ8m9E=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Yk82cAQ5Cl5f3AQH/0A6torZC1j8A44wmw3HM6aRCRF8gI195OIlOixu75fmvSpcM\n\txW0djX/CUuIzMQe/uekzBcOoioS40Fj/n6SxxrpMiEtA+MQUDSADIZxI/Yrfr0BSRG\n\txXfdxgsTWajtEVhGpG3HsZpPEIHhOWcjM9Q7H2oc=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 29 Sep 2019 22:02:47 +0300", "Message-Id": "<20190929190254.18920-7-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190929190254.18920-1-laurent.pinchart@ideasonboard.com>", "References": "<20190929190254.18920-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 06/13] libcamera: controls: Remove the\n\tunused ControlList::update() method", "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>", "X-List-Received-Date": "Sun, 29 Sep 2019 19:03:15 -0000" }, "content": "The ControlList::update() method is unused. While it is meant to fulfil\na need of applications, having no user means that it is most probably\nnot correctly designed. Remove the method, we will add it back later if\nneeded.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/controls.h | 2 --\n src/libcamera/controls.cpp | 28 ----------------------\n test/controls/control_list.cpp | 43 ----------------------------------\n 3 files changed, 73 deletions(-)", "diff": "diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 9698bd1dd383..d4a74ada1b6a 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -158,8 +158,6 @@ public:\n \t\tval->set<T>(value);\n \t}\n \n-\tvoid update(const ControlList &list);\n-\n private:\n \tconst ControlValue *find(const ControlId &id) const;\n \tControlValue *find(const ControlId &id);\ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex a34af588fc7e..5e8b3a9b5184 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -512,32 +512,4 @@ ControlValue *ControlList::find(const ControlId &id)\n \treturn &controls_[&id];\n }\n \n-/**\n- * \\brief Update the list with a union of itself and \\a other\n- * \\param other The other list\n- *\n- * Update the control list to include all values from the \\a other list.\n- * Elements in the list whose control IDs are contained in \\a other are updated\n- * with the value from \\a other. Elements in the \\a other list that have no\n- * corresponding element in the list are added to the list with their value.\n- *\n- * The behaviour is undefined if the two lists refer to different Camera\n- * instances.\n- */\n-void ControlList::update(const ControlList &other)\n-{\n-\tif (other.camera_ != camera_) {\n-\t\tLOG(Controls, Error)\n-\t\t\t<< \"Can't update ControlList from a different camera\";\n-\t\treturn;\n-\t}\n-\n-\tfor (auto it : other) {\n-\t\tconst ControlId *id = it.first;\n-\t\tconst ControlValue &value = it.second;\n-\n-\t\tcontrols_[id] = value;\n-\t}\n-}\n-\n } /* namespace libcamera */\ndiff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp\nindex 053696814b67..8469ecf09439 100644\n--- a/test/controls/control_list.cpp\n+++ b/test/controls/control_list.cpp\n@@ -141,49 +141,6 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\t/*\n-\t\t * Test list merging. Create a new list, add two controls with\n-\t\t * one overlapping the existing list, merge the lists and clear\n-\t\t * the old list. Verify that the new list is empty and that the\n-\t\t * new list contains the expected items and values.\n-\t\t */\n-\t\tControlList newList(camera_.get());\n-\n-\t\tnewList.set(controls::Brightness, 128);\n-\t\tnewList.set(controls::Saturation, 255);\n-\t\tnewList.update(list);\n-\n-\t\tlist.clear();\n-\n-\t\tif (list.size() != 0) {\n-\t\t\tcout << \"Old List should contain zero items\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (!list.empty()) {\n-\t\t\tcout << \"Old List should be empty\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (newList.size() != 3) {\n-\t\t\tcout << \"New list has incorrect size\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (!newList.contains(controls::Brightness) ||\n-\t\t !newList.contains(controls::Contrast) ||\n-\t\t !newList.contains(controls::Saturation)) {\n-\t\t\tcout << \"New list contains incorrect items\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n-\t\tif (newList.get(controls::Brightness) != 10 ||\n-\t\t newList.get(controls::Contrast) != 20 ||\n-\t\t newList.get(controls::Saturation) != 255) {\n-\t\t\tcout << \"New list contains incorrect values\" << endl;\n-\t\t\treturn TestFail;\n-\t\t}\n-\n \t\treturn TestPass;\n \t}\n \n", "prefixes": [ "libcamera-devel", "v2", "06/13" ] }