include/sal/log.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 7d5cc08d290d0df9af2c73cef0be8f470decea27 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jun 21 12:10:21 2022 +0200 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Fri Jun 24 15:36:15 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> (cherry picked from commit 1fd6298be955331f64f6f0b2e04675d9914f44e4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136380 Tested-by: Michael Meeks <michael.me...@collabora.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/include/sal/log.hxx b/include/sal/log.hxx index fd3bf56e0dd7..6f61d0c52a34 100644 --- a/include/sal/log.hxx +++ b/include/sal/log.hxx @@ -144,7 +144,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)) \ { \