Toward core module compiling.

This commit is contained in:
jmsgrogan 2023-12-27 12:20:02 +00:00
parent c25a56ee19
commit 3ed195d7dd
305 changed files with 1774 additions and 1065 deletions

View file

@ -18,7 +18,7 @@ Byte BitStream::getCurrentByte()
void BitStream::write(DWord data)
{
for(std::size_t idx=0; idx<sizeof(DWord); idx++)
for(size_t idx=0; idx<sizeof(DWord); idx++)
{
writeByte(ByteUtils::getByteN(data, idx));
}
@ -37,7 +37,7 @@ int BitStream::getCurrentByteOffset() const
return mByteOffset;
}
std::size_t BitStream::getCurrentBitOffset() const
size_t BitStream::getCurrentBitOffset() const
{
return mBitOffset;
}
@ -50,10 +50,10 @@ String BitStream::logLocation()
return ret;
}
String BitStream::logNextNBytes(std::size_t n) const
String BitStream::logNextNBytes(size_t n) const
{
Stringstream sstr;
std::size_t count{0};
size_t count{0};
VecBytes bytes;
peekNextNBytes(n, bytes);
for(auto byte : bytes)
@ -64,7 +64,7 @@ String BitStream::logNextNBytes(std::size_t n) const
return sstr.str();
}
void BitStream::writeNBits(DWord data, std::size_t length)
void BitStream::writeNBits(DWord data, size_t length)
{
const auto num_left = 8 - mBitOffset;
const int overshoot = length - num_left;
@ -76,8 +76,8 @@ void BitStream::writeNBits(DWord data, std::size_t length)
writeByte(mCurrentByte, false);
std::size_t num_bytes = overshoot / 8;
for (std::size_t idx=0; idx< num_bytes; idx++)
size_t num_bytes = overshoot / 8;
for (size_t idx=0; idx< num_bytes; idx++)
{
mCurrentByte = ByteUtils::getMBitsAtN(static_cast<Byte>(data), overshoot, idx*8 + num_left);
writeByte(mCurrentByte, false);
@ -107,7 +107,7 @@ void BitStream::writeNBits(DWord data, std::size_t length)
}
}
bool BitStream::readNextNBits(std::size_t n, Byte& buffer)
bool BitStream::readNextNBits(size_t n, Byte& buffer)
{
if (mByteOffset < 0)
{
@ -169,7 +169,7 @@ void BitStream::flushRemainingBits()
}
}
std::pair<Byte, std::size_t> BitStream::getRemainingBits() const
std::pair<Byte, size_t> BitStream::getRemainingBits() const
{
return {mEndByte, mEndBitOffset};
}