From 0228e9c927351d483fe696e5ca6eea9c2b2cbc87 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 19 Jan 2020 00:38:04 +0200 Subject: libcamera: Declare static local variables as const where applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use static local variables to indicate errors in methods that return a const reference. The local variables can thus be const, make them so. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcamera/log.cpp') diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp index 1dac4666..1c82dc68 100644 --- a/src/libcamera/log.cpp +++ b/src/libcamera/log.cpp @@ -749,7 +749,7 @@ void LogCategory::setSeverity(LogSeverity severity) */ const LogCategory &LogCategory::defaultCategory() { - static LogCategory category("default"); + static const LogCategory category("default"); return category; } -- cgit v1.2.1