From 75c963146eb6287532d6be36aaa251bac3b9db2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 18 Dec 2025 18:46:24 +0100 Subject: [PATCH] libcamera: base: log: Remove `LogInvalid` check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A `LogMessage` instance cannot be moved or copied, so a severity of `LogInvalid` is only possible if the message was constructed with that log level explicitly. However, being a completely internal type, this does not occur. So remove the check. And even if it does, it's probably still better to print the message than to drop it silently. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/base/log.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index da45b0d6..7d308afa 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -857,10 +857,6 @@ LogMessage::LogMessage(const char *fileName, unsigned int line, LogMessage::~LogMessage() { - /* Don't print anything if we have been moved to another LogMessage. */ - if (severity_ == LogInvalid) - return; - Logger *logger = Logger::instance(); if (!logger) return;