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}
diff --git a/rtc_base/bitbuffer.cc b/rtc_base/bitbuffer.cc
index 86247af..025cfe1 100644
--- a/rtc_base/bitbuffer.cc
+++ b/rtc_base/bitbuffer.cc
@@ -200,8 +200,8 @@
return true;
}
-void BitBuffer::GetCurrentOffset(
- size_t* out_byte_offset, size_t* out_bit_offset) {
+void BitBuffer::GetCurrentOffset(size_t* out_byte_offset,
+ size_t* out_bit_offset) {
RTC_CHECK(out_byte_offset != nullptr);
RTC_CHECK(out_bit_offset != nullptr);
*out_byte_offset = byte_offset_;
@@ -219,8 +219,7 @@
}
BitBufferWriter::BitBufferWriter(uint8_t* bytes, size_t byte_count)
- : BitBuffer(bytes, byte_count), writable_bytes_(bytes) {
-}
+ : BitBuffer(bytes, byte_count), writable_bytes_(bytes) {}
bool BitBufferWriter::WriteUInt8(uint8_t val) {
return WriteBits(val, sizeof(uint8_t) * 8);
@@ -251,8 +250,8 @@
size_t remaining_bits_in_current_byte = 8 - bit_offset_;
size_t bits_in_first_byte =
std::min(bit_count, remaining_bits_in_current_byte);
- *bytes = WritePartialByte(
- HighestByte(val), bits_in_first_byte, *bytes, bit_offset_);
+ *bytes = WritePartialByte(HighestByte(val), bits_in_first_byte, *bytes,
+ bit_offset_);
if (bit_count <= remaining_bits_in_current_byte) {
// Nothing left to write, so quit early.
return ConsumeBits(total_bits);