diff --git a/Include/Aurora/Memory/ByteBuffer_Utils.inl b/Include/Aurora/Memory/ByteBuffer_Utils.inl index 541b9884..1620270b 100644 --- a/Include/Aurora/Memory/ByteBuffer_Utils.inl +++ b/Include/Aurora/Memory/ByteBuffer_Utils.inl @@ -206,6 +206,8 @@ namespace Aurora::Memory this->flagCircular = other.flagCircular; this->flagExpandable = other.flagExpandable; this->flagAlwaysExpandable = other.flagAlwaysExpandable; + this->flagNoRealloc = other.flagNoRealloc; + this->flagNoFree = other.flagNoFree; this->scaleSize = other.scaleSize; other.base = {}; other.length = {}; @@ -216,6 +218,8 @@ namespace Aurora::Memory other.flagExpandable = {}; other.flagAlwaysExpandable = {}; other.scaleSize = {}; + other.flagNoRealloc = {}; + other.flagNoFree = {}; return *this; } @@ -229,21 +233,12 @@ namespace Aurora::Memory } this->length = buffer.length; this->allocSize = buffer.length; - if (true) //preservePointers - { - this->writePtr = this->base + (buffer.writePtr - buffer.base); - this->readPtr = this->base + (buffer.readPtr - buffer.base); - } - //else - //{ - // this->writePtr = this->base; - // this->readPtr = this->base; - //} + this->writePtr = this->base + (buffer.writePtr - buffer.base); + this->readPtr = this->base + (buffer.readPtr - buffer.base); AuMemcpy(this->base, buffer.base, this->length); this->flagCircular = buffer.flagCircular; this->flagExpandable = buffer.flagExpandable; this->flagAlwaysExpandable = buffer.flagAlwaysExpandable; - this->scaleSize = buffer.scaleSize; return *this; }