codec/h264/h264dec: removed readBitsInt and readBool

This commit is contained in:
Saxon 2019-07-29 12:33:14 +09:30
parent 9f47b22a84
commit 75a6df5da5
1 changed files with 1 additions and 12 deletions

View File

@ -49,20 +49,9 @@ func newFieldReader(br *bits.BitReader) fieldReader {
return fieldReader{br: br}
}
// readBool returns a bool from reading one bit from br. If we have an error
// already, we do not continue with the read.
func (r fieldReader) readBool() bool {
if r.e != nil {
return false
}
var b uint64
b, r.e = r.br.ReadBits(1)
return b == 1
}
// readBitsInt returns an int from reading n bits from br. If we have an error
// already, we do not continue with the read.
func (r fieldReader) readBitsInt(n int) int {
func (r fieldReader) readBits(n int) int {
if r.e != nil {
return 0
}