From c4a27ad5ab5e2d034377fe77ca3e1253ae0c29ef Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Fri, 1 Nov 2019 03:36:29 -0400 Subject: [PATCH] Hopefully made older go happy about bitshifts. --- Common/BitStream.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/BitStream.go b/Common/BitStream.go index 942d43ff..ced82554 100644 --- a/Common/BitStream.go +++ b/Common/BitStream.go @@ -29,7 +29,7 @@ func (v *BitStream) ReadBits(bitCount int) int { if !v.EnsureBits(bitCount) { return -1 } - result := v.current & (0xffff >> (16 - bitCount)) + result := v.current & (0xffff >> uint(16-bitCount)) v.WasteBits(bitCount) return result } @@ -52,13 +52,13 @@ func (v *BitStream) EnsureBits(bitCount int) bool { } nextValue := v.data[v.dataPosition] v.dataPosition++ - v.current |= int(nextValue) << v.bitCount + v.current |= int(nextValue) << uint(v.bitCount) v.bitCount += 8 return true } // WasteBits dry-reads the specified number of bits func (v *BitStream) WasteBits(bitCount int) { - v.current >>= bitCount + v.current >>= uint(bitCount) v.bitCount -= bitCount }