From e45ab7a121500d8d1927b6879834d903d6a6c842 Mon Sep 17 00:00:00 2001 From: Karl Wiberg Date: Tue, 22 Sep 2020 09:35:13 +0200 Subject: [PATCH] RTC_LOG: Remove unnecessary optimization The IsNoop() function already knows whether logging is off, and is inlined precisely in the cases where it is statically switched off. So this source change results in no binary change. When I compile this locally for arm64 (Android, opt build) I get identical md5 sums for libjingle_peerconnection_so.so before and after this CL. Bug: webrtc:11968 Change-Id: I4db9a3e1a1a84eea7825dad7720df742a6ec9255 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184933 Reviewed-by: Mirko Bonadei Commit-Queue: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#32156} --- rtc_base/logging.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtc_base/logging.h b/rtc_base/logging.h index 9bfb187fb6..69b978a593 100644 --- a/rtc_base/logging.h +++ b/rtc_base/logging.h @@ -598,10 +598,10 @@ class LogMessage { // Logging Helpers ////////////////////////////////////////////////////////////////////// -#define RTC_LOG_FILE_LINE(sev, file, line) \ - RTC_LOG_ENABLED() && !rtc::LogMessage::IsNoop(sev) && \ - ::rtc::webrtc_logging_impl::LogCall() & \ - ::rtc::webrtc_logging_impl::LogStreamer<>() \ +#define RTC_LOG_FILE_LINE(sev, file, line) \ + !rtc::LogMessage::IsNoop(sev) && \ + ::rtc::webrtc_logging_impl::LogCall() & \ + ::rtc::webrtc_logging_impl::LogStreamer<>() \ << ::rtc::webrtc_logging_impl::LogMetadata(file, line, sev) #define RTC_LOG(sev) RTC_LOG_FILE_LINE(::rtc::sev, __FILE__, __LINE__)