From 653c73a83c15901b25b4d4a403619d9b91e2370f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Apr 2025 08:12:15 -0700 Subject: [PATCH] QLoggingRegistry: mark that qtLoggingDebug() is unlikely to be true Just to nudge the compilers in the right way of optimizing. Change-Id: I3cf0c3541326c0aec113fffd96a75d3b18f8162d Reviewed-by: Ivan Solovev --- src/corelib/io/qloggingregistry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index ece58cfa87e..aa64410dcda 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -256,7 +256,7 @@ static bool qtLoggingDebug() debugMsg("QT_LOGGING_DEBUG environment variable is set."); return debug; }(); - return debugEnv; + return Q_UNLIKELY(debugEnv); } static QList loadRulesFromFile(const QString &filePath)