include/sal/log.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1fd6298be955331f64f6f0b2e04675d9914f44e4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jun 21 12:10:21 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jun 21 18:23:54 2022 +0200 use SAL_UNLIKELY to make logging a little more efficient if we have logging compiled into a release build, the most frequent logging (e.g. INFO) is typically off, so most of the time, we are not going to execute the logging. Change-Id: I2b464b4153307df8730998728e508cce09d5013b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/sal/log.hxx b/include/sal/log.hxx index 5faeec3113dc..a60d8dc24829 100644 --- a/include/sal/log.hxx +++ b/include/sal/log.hxx @@ -148,7 +148,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) { #define SAL_DETAIL_LOG_STREAM(condition, level, area, where, stream) \ do { \ - if (condition) \ + if (SAL_UNLIKELY(condition)) \ { \ switch (sal_detail_log_report(level, area)) \ { \