Chromium Code Reviews
DescriptionUpdate BitWriter buffer position on flush.
When a BitWriter is flushed (through BitWriter::Flush()) the buffer
position is not updated even though additional bits are written. When the
BitWriter is used after the flush, BitWriter::position() would return
incorrect positions.
This CL fixes the behavior by updating |position_| in BitWriter::Flush()
to account for the padding bits (8 - |used_|).
Also removes BitWriter::BitLength() which is unused.
BUG=595493
Review-Url: https://codereview.chromium.org/2700433004
Cr-Commit-Position: refs/heads/master@{#450923}
Committed: https://chromium.googlesource.com/chromium/src/+/39a7d963f56666f34a337c87c4ddc8d432b1c39c
Patch Set 1 #
Messages
Total messages: 13 (9 generated)
|
||||||||||||||||||||||||||||