[*] Bytebuffer move: missing flags
This commit is contained in:
parent
cde973ba90
commit
503fd40032
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user