From 8f6f63a2088875563c886946132bebc2ff624141 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 11 Apr 2019 18:52:56 +0300 Subject: libcamera: log: Mark Loggable::_log() methods as const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The methods don't modify the object instance, mark them as const. This allows using the LOG() macro from a const method of a Loggable object. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- src/libcamera/log.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libcamera/log.cpp') diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp index 71cfbc42..77927ec3 100644 --- a/src/libcamera/log.cpp +++ b/src/libcamera/log.cpp @@ -506,7 +506,7 @@ Loggable::~Loggable() * \return A log message */ LogMessage Loggable::_log(const char *fileName, unsigned int line, - LogSeverity severity) + LogSeverity severity) const { LogMessage msg(fileName, line, severity); @@ -527,7 +527,8 @@ LogMessage Loggable::_log(const char *fileName, unsigned int line, * \return A log message */ LogMessage Loggable::_log(const char *fileName, unsigned int line, - const LogCategory &category, LogSeverity severity) + const LogCategory &category, + LogSeverity severity) const { LogMessage msg(fileName, line, category, severity); -- cgit v1.2.1