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:
@ -200,8 +200,8 @@ bool BitBuffer::ReadSignedExponentialGolomb(int32_t* val) {
|
||||
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 @@ bool BitBuffer::Seek(size_t byte_offset, size_t bit_offset) {
|
||||
}
|
||||
|
||||
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 @@ bool BitBufferWriter::WriteBits(uint64_t val, size_t bit_count) {
|
||||
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);
|
||||
|
Reference in New Issue
Block a user