Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-04-19 09:37:04 +08:00
commit 552db66da0
7 changed files with 73 additions and 33 deletions

View file

@ -106,8 +106,16 @@ public:
AlignedBuffer& operator=(AlignedBuffer&& aOther)
{
this->~AlignedBuffer();
new (this) AlignedBuffer(Move(aOther));
if (&aOther == this) {
return *this;
}
mData = aOther.mData;
mLength = aOther.mLength;
mBuffer = Move(aOther.mBuffer);
mCapacity = aOther.mCapacity;
aOther.mData = nullptr;
aOther.mLength = 0;
aOther.mCapacity = 0;
return *this;
}