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 <ivan.solovev@qt.io>
This commit is contained in:
Thiago Macieira 2025-04-03 08:12:15 -07:00
parent 5e1a178732
commit 653c73a83c

View File

@ -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<QLoggingRule> loadRulesFromFile(const QString &filePath)