Be more clever when passing default arguments in log statements

Default argument values are taken care of at the call site. If we
switch to a separate overload, all of those call sites won't have to
pass the default values, saving a few instructions each time.

In aggregate, this reduces the size of libjingle_peerconnection_so.so
by 12 kB.

Bug: webrtc:9185
Change-Id: I8c792c7c6e5b230376dd129d16d9ed2541444d88
Reviewed-on: https://webrtc-review.googlesource.com/74440
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23112}
This commit is contained in:
Karl Wiberg
2018-05-04 10:42:28 +02:00
committed by Commit Bot
parent 65ddf07219
commit ab4f1c1bce
2 changed files with 6 additions and 2 deletions

View File

@ -121,11 +121,12 @@ class LogSink {
class LogMessage {
public:
LogMessage(const char* file, int line, LoggingSeverity sev);
LogMessage(const char* file,
int line,
LoggingSeverity sev,
LogErrorContext err_ctx = ERRCTX_NONE,
int err = 0);
LogErrorContext err_ctx,
int err);
#if defined(WEBRTC_ANDROID)
LogMessage(const char* file, int line, LoggingSeverity sev, const char* tag);