Patch Detail
Show a patch.
GET /api/1.1/patches/1049/?format=api
{ "id": 1049, "url": "https://patchwork.libcamera.org/api/1.1/patches/1049/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1049/", "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": "<20190418141437.14014-3-laurent.pinchart@ideasonboard.com>", "date": "2019-04-18T14:14:26", "name": "[libcamera-devel,v3,02/13] libcamera: log: Mark Loggable::_log() methods as const", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "315ef1255ca8132762fccb79eaf9f5475edd87a1", "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/1049/mbox/", "series": [ { "id": 256, "url": "https://patchwork.libcamera.org/api/1.1/series/256/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=256", "date": "2019-04-18T14:14:24", "name": "Rockchip ISP pipeline handler", "version": 3, "mbox": "https://patchwork.libcamera.org/series/256/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1049/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1049/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 4CBE460DBE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Apr 2019 16:14:54 +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 D728B333\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Apr 2019 16:14:53 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1555596894;\n\tbh=iwgyLW0MWnGp2TxvsW836wfzPZek82oY/7CT1iPNJy8=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Yo3GHJ1qS5zYp0/9wjbgVRjhwrtpu6AtjyMn8qGAA6EOwx2qOwKX9uO6ZzkyA20xv\n\tUIrPwTHJDwBPCj7KyLal2Np3vnjJBfMkGi/un3KoVlPxOKKh6ZS0RlYcR6Su45KkDr\n\thE7rH+11z76WhcJ8kOtfLyPm+Tm6P3AgmsghgWoA=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 18 Apr 2019 17:14:26 +0300", "Message-Id": "<20190418141437.14014-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190418141437.14014-1-laurent.pinchart@ideasonboard.com>", "References": "<20190418141437.14014-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 02/13] libcamera: log: Mark\n\tLoggable::_log() methods as const", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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": "Thu, 18 Apr 2019 14:14:54 -0000" }, "content": "The methods don't modify the object instance, mark them as const. This\nallows using the LOG() macro from a const method of a Loggable object.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/log.h | 5 +++--\n src/libcamera/log.cpp | 5 +++--\n 2 files changed, 6 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/libcamera/include/log.h b/src/libcamera/include/log.h\nindex 8ea5a1eb673a..35a6fc105448 100644\n--- a/src/libcamera/include/log.h\n+++ b/src/libcamera/include/log.h\n@@ -76,9 +76,10 @@ protected:\n \tvirtual std::string logPrefix() const = 0;\n \n \tLogMessage _log(const char *file, unsigned int line,\n-\t\t\tLogSeverity severity);\n+\t\t\tLogSeverity severity) const;\n \tLogMessage _log(const char *file, unsigned int line,\n-\t\t\tconst LogCategory &category, LogSeverity severity);\n+\t\t\tconst LogCategory &category,\n+\t\t\tLogSeverity severity) const;\n };\n \n LogMessage _log(const char *file, unsigned int line, LogSeverity severity);\ndiff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\nindex 71cfbc422ba0..77927ec35b62 100644\n--- a/src/libcamera/log.cpp\n+++ b/src/libcamera/log.cpp\n@@ -506,7 +506,7 @@ Loggable::~Loggable()\n * \\return A log message\n */\n LogMessage Loggable::_log(const char *fileName, unsigned int line,\n-\t\t\t LogSeverity severity)\n+\t\t\t LogSeverity severity) const\n {\n \tLogMessage msg(fileName, line, severity);\n \n@@ -527,7 +527,8 @@ LogMessage Loggable::_log(const char *fileName, unsigned int line,\n * \\return A log message\n */\n LogMessage Loggable::_log(const char *fileName, unsigned int line,\n-\t\t\t const LogCategory &category, LogSeverity severity)\n+\t\t\t const LogCategory &category,\n+\t\t\t LogSeverity severity) const\n {\n \tLogMessage msg(fileName, line, category, severity);\n \n", "prefixes": [ "libcamera-devel", "v3", "02/13" ] }