include/sal/log.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 4ed228b81d9d051addda86a4394ed2ad878cf34d 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 20:53:32 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/+/136379 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> 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)) \ { \