Fix windows compilation.

This commit is contained in:
jmsgrogan 2022-11-30 20:53:17 +00:00
parent b45385e8c7
commit b17ba8b3a7
23 changed files with 85 additions and 53 deletions

View file

@ -18,7 +18,7 @@ ByteUtils::Word ByteUtils::GetWordLastByte(const Word word)
unsigned char ByteUtils::getHigherNBits(unsigned char input, unsigned num)
{
return input >> 8 - num;
return input >> (8 - num);
}
unsigned char ByteUtils::getByteN(uint32_t input, unsigned n)

View file

@ -78,7 +78,7 @@ void BitStream::writeNBits(uint32_t data, unsigned length)
writeByte(mCurrentByte, false);
auto num_bytes = overshoot / 8;
unsigned num_bytes = overshoot / 8;
for (unsigned idx=0; idx< num_bytes; idx++)
{
mCurrentByte = ByteUtils::getMBitsAtN(data, overshoot, idx*8 + num_left);

View file

@ -3,6 +3,7 @@
#include "BitStream.h"
#include <vector>
#include <iterator>
class BufferBitStream : public BitStream
{