Reformat the WebRTC code base

Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -16,9 +16,8 @@ namespace rtc {
static const int BUF_SIZE = 64 * 1024;
AsyncUDPSocket* AsyncUDPSocket::Create(
AsyncSocket* socket,
const SocketAddress& bind_address) {
AsyncUDPSocket* AsyncUDPSocket::Create(AsyncSocket* socket,
const SocketAddress& bind_address) {
std::unique_ptr<AsyncSocket> owned_socket(socket);
if (socket->Bind(bind_address) < 0) {
RTC_LOG(LS_ERROR) << "Bind() failed with error " << socket->GetError();
@ -36,8 +35,7 @@ AsyncUDPSocket* AsyncUDPSocket::Create(SocketFactory* factory,
return Create(socket, bind_address);
}
AsyncUDPSocket::AsyncUDPSocket(AsyncSocket* socket)
: socket_(socket) {
AsyncUDPSocket::AsyncUDPSocket(AsyncSocket* socket) : socket_(socket) {
size_ = BUF_SIZE;
buf_ = new char[size_];
@ -47,7 +45,7 @@ AsyncUDPSocket::AsyncUDPSocket(AsyncSocket* socket)
}
AsyncUDPSocket::~AsyncUDPSocket() {
delete [] buf_;
delete[] buf_;
}
SocketAddress AsyncUDPSocket::GetLocalAddress() const {
@ -58,7 +56,8 @@ SocketAddress AsyncUDPSocket::GetRemoteAddress() const {
return socket_->GetRemoteAddress();
}
int AsyncUDPSocket::Send(const void *pv, size_t cb,
int AsyncUDPSocket::Send(const void* pv,
size_t cb,
const rtc::PacketOptions& options) {
rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis(),
options.info_signaled_after_sent);
@ -68,7 +67,8 @@ int AsyncUDPSocket::Send(const void *pv, size_t cb,
return ret;
}
int AsyncUDPSocket::SendTo(const void *pv, size_t cb,
int AsyncUDPSocket::SendTo(const void* pv,
size_t cb,
const SocketAddress& addr,
const rtc::PacketOptions& options) {
rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis(),
@ -117,8 +117,7 @@ void AsyncUDPSocket::OnReadEvent(AsyncSocket* socket) {
// TODO: Do something better like forwarding the error to the user.
SocketAddress local_addr = socket_->GetLocalAddress();
RTC_LOG(LS_INFO) << "AsyncUDPSocket[" << local_addr.ToSensitiveString()
<< "] receive failed with error "
<< socket_->GetError();
<< "] receive failed with error " << socket_->GetError();
return;
}