mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-03 02:30:58 +00:00
- replaced all uses of Bfree with Xfree so they are subjected to debug instrumentation, uses FStrings in a few cases where it made sense.
- fixed: Sound channels weren't freed.
This commit is contained in:
parent
eff25141a0
commit
d473f9c590
15 changed files with 66 additions and 153 deletions
|
@ -29,13 +29,12 @@ BitReader::BitReader(SmackerCommon::FileStream &file, uint32_t size)
|
|||
this->currentOffset = 0;
|
||||
this->bytesRead = 0;
|
||||
|
||||
this->cache = (uint8_t*)Xmalloc(size);
|
||||
file.ReadBytes(this->cache, size);
|
||||
this->Cache.Resize(size);
|
||||
file.ReadBytes(this->Cache.Data(), size);
|
||||
}
|
||||
|
||||
BitReader::~BitReader()
|
||||
{
|
||||
Bfree(this->cache);
|
||||
}
|
||||
|
||||
void BitReader::FillCache()
|
||||
|
@ -54,7 +53,7 @@ uint32_t BitReader::GetPosition()
|
|||
|
||||
uint32_t BitReader::GetBit()
|
||||
{
|
||||
uint32_t ret = (cache[currentOffset>>3]>>(currentOffset&7))&1;
|
||||
uint32_t ret = (Cache[currentOffset>>3]>>(currentOffset&7))&1;
|
||||
currentOffset++;
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue