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 <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32156}
This commit is contained in:
Karl Wiberg 2020-09-22 09:35:13 +02:00 committed by Commit Bot
parent 0e88438111
commit e45ab7a121

View File

@ -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__)