mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Improved ce handling of failed irCodeGen, const null ptr handling
This commit is contained in:
parent
2f66bcafcc
commit
e82f9ce3ee
3 changed files with 57 additions and 12 deletions
|
@ -149,11 +149,22 @@ int ChunkedDataBuffer::GetReadPos()
|
|||
}
|
||||
|
||||
void ChunkedDataBuffer::SetReadPos(int pos)
|
||||
{
|
||||
{
|
||||
mReadPoolIdx = pos / ALLOC_SIZE;
|
||||
mReadCurAlloc = mPools[mReadPoolIdx];
|
||||
mReadCurPtr = mReadCurAlloc + pos % ALLOC_SIZE;
|
||||
mReadNextAlloc = mReadCurPtr + ALLOC_SIZE;
|
||||
if (mReadPoolIdx < mPools.mSize)
|
||||
{
|
||||
mReadCurAlloc = mPools[mReadPoolIdx];
|
||||
mReadCurPtr = mReadCurAlloc + pos % ALLOC_SIZE;
|
||||
mReadNextAlloc = mReadCurPtr + ALLOC_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Place at end of last pool
|
||||
mReadPoolIdx = mPools.mSize - 1;
|
||||
mReadCurAlloc = mPools[mReadPoolIdx];
|
||||
mReadCurPtr = mReadCurAlloc + ALLOC_SIZE;
|
||||
mReadNextAlloc = mReadCurPtr;
|
||||
}
|
||||
}
|
||||
|
||||
void ChunkedDataBuffer::NextReadPool()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue