From 503fd4003265eb72b354073fec1c827aa2cb7643 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Fri, 1 Dec 2023 07:18:11 +0000 Subject: [PATCH] [*] Bytebuffer move: missing flags --- Include/Aurora/Memory/ByteBuffer_Utils.inl | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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; }