Patch Detail
Show a patch.
GET /api/1.1/patches/2300/?format=api
{ "id": 2300, "url": "https://patchwork.libcamera.org/api/1.1/patches/2300/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2300/", "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": "<20191108205409.18845-5-laurent.pinchart@ideasonboard.com>", "date": "2019-11-08T20:53:49", "name": "[libcamera-devel,v2,04/24] libcamera: controls: Add operator== and operator!= to ControlRange", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "dda76b62a3679bab3b7f1d1bb15f41d671461c33", "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/2300/mbox/", "series": [ { "id": 568, "url": "https://patchwork.libcamera.org/api/1.1/series/568/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=568", "date": "2019-11-08T20:53:45", "name": "Control serialization and IPA C API", "version": 2, "mbox": "https://patchwork.libcamera.org/series/568/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2300/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2300/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 C12F46150A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 8 Nov 2019 21:54:23 +0100 (CET)", "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 6A8FD2D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 8 Nov 2019 21:54:23 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1573246463;\n\tbh=e3dtX6ahdlkXeAiEXmFYjzT+E4GcwvbePsaDqt/KQZ0=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=JxQloEf7tcJ5an0vG9735jV+VS8yoLHlGnIqSB0ESH9Q4aBWpnTQd77urCKGUGu8g\n\tR203229ow3eunoG4Dcd+rTMd5f8RnucRtO/QnXHGGNbLGC+JLXz1H8TX4wAgR8ax13\n\t/md91NmtupQsJa3irPk3/YWX6LYK9bT2cNFla8go=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 8 Nov 2019 22:53:49 +0200", "Message-Id": "<20191108205409.18845-5-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191108205409.18845-1-laurent.pinchart@ideasonboard.com>", "References": "<20191108205409.18845-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 04/24] libcamera: controls: Add\n\toperator== and operator!= to ControlRange", "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": "Fri, 08 Nov 2019 20:54:23 -0000" }, "content": "Allow comparision of control ranges by adding the required operators.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/controls.h | 9 +++++++++\n src/libcamera/controls.cpp | 11 +++++++++++\n 2 files changed, 20 insertions(+)", "diff": "diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 42e6df7e613d..19075858fbba 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -112,6 +112,15 @@ public:\n \n \tstd::string toString() const;\n \n+\tbool operator==(const ControlRange &other) const\n+\t{\n+\t\treturn min_ == other.min_ && max_ == other.max_;\n+\t}\n+\tbool operator!=(const ControlRange &other) const\n+\t{\n+\t\treturn !(*this == other);\n+\t}\n+\n private:\n \tControlValue min_;\n \tControlValue max_;\ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex 0c7cd449ad64..2c5c98633585 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -383,6 +383,17 @@ std::string ControlRange::toString() const\n \treturn ss.str();\n }\n \n+/**\n+ * \\fn bool ControlRange::operator==()\n+ * \\brief Compare ControlRange instances for equality\n+ * \\return True if the ranges have identical min and max, false otherwise\n+ */\n+/**\n+ * \\fn bool ControlRange::operator!=()\n+ * \\brief Compare ControlRange instances for non equality\n+ * \\return False if the ranges have identical min and max, true otherwise\n+ */\n+\n /**\n * \\typedef ControlIdMap\n * \\brief A map of numerical control ID to ControlId\n", "prefixes": [ "libcamera-devel", "v2", "04/24" ] }