summaryrefslogtreecommitdiff
path: root/src/libcamera/log.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-11 18:52:56 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-18 18:12:59 +0300
commit8f6f63a2088875563c886946132bebc2ff624141 (patch)
tree8ddfecd028cb459549397642831b1cbc94e5217b /src/libcamera/log.cpp
parent9e3f9c5261cfb757594d25490bc82b0693b35858 (diff)
libcamera: log: Mark Loggable::_log() methods as const
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/log.cpp')
-rw-r--r--src/libcamera/log.cpp5
1 files changed, 3 insertions, 2 deletions
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);