[*] why not make these mean something while we can

This commit is contained in:
Reece Wilson 2023-11-04 23:33:25 +00:00
parent 0331c7cf87
commit 028c85e4c8

View File

@ -14,6 +14,11 @@ namespace Aurora::Memory
AuUInt linearOverhead = 0, toReadOverhead = 0, linearWritable = 0, toReadWritable = 0, writable = 0; AuUInt linearOverhead = 0, toReadOverhead = 0, linearWritable = 0, toReadWritable = 0, writable = 0;
auto cptr = reinterpret_cast<const AuUInt8 *>(buffer); auto cptr = reinterpret_cast<const AuUInt8 *>(buffer);
if (this->flagWriteError)
{
return 0;
}
if (flagCircular) if (flagCircular)
{ {
if (readPtr == base + length) if (readPtr == base + length)
@ -126,6 +131,12 @@ namespace Aurora::Memory
AuUInt ByteBuffer::Read(void *out, AuUInt requestedLength, bool peek) AuUInt ByteBuffer::Read(void *out, AuUInt requestedLength, bool peek)
{ {
AuUInt linearOverhead = 0, toWriteOverhead = 0, linearReadable = 0, toWriteReadable = 0; AuUInt linearOverhead = 0, toWriteOverhead = 0, linearReadable = 0, toWriteReadable = 0;
if (this->flagReadError)
{
return 0;
}
if (flagCircular) if (flagCircular)
{ {
if (readPtr == base + length) if (readPtr == base + length)