mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Merge branch 'master' into 635-nvrhi3
This commit is contained in:
commit
b3bab4de96
5 changed files with 66 additions and 0 deletions
|
@ -104,6 +104,17 @@ private:
|
|||
memcpy( data, other.data, other.dataSize );
|
||||
return *this;
|
||||
}
|
||||
idBinaryImageData& operator=( idBinaryImageData&& other )
|
||||
{
|
||||
if( this == &other )
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
dataSize = other.dataSize;
|
||||
data = other.data;
|
||||
other.data = NULL;
|
||||
return *this;
|
||||
}
|
||||
void Free()
|
||||
{
|
||||
if( data != NULL )
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
idSWFDictionaryEntry();
|
||||
~idSWFDictionaryEntry();
|
||||
idSWFDictionaryEntry& operator=( idSWFDictionaryEntry& other );
|
||||
idSWFDictionaryEntry& operator=( idSWFDictionaryEntry&& other );
|
||||
|
||||
swfDictType_t type;
|
||||
const idMaterial* material;
|
||||
|
|
|
@ -84,6 +84,33 @@ idSWFBitStream& idSWFBitStream::operator=( idSWFBitStream& other )
|
|||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idSWFBitStream::operator=
|
||||
========================
|
||||
*/
|
||||
idSWFBitStream& idSWFBitStream::operator=( idSWFBitStream&& other )
|
||||
{
|
||||
Free();
|
||||
free = other.free;
|
||||
startp = other.startp;
|
||||
readp = other.readp;
|
||||
endp = other.endp;
|
||||
currentBit = other.currentBit;
|
||||
currentByte = other.currentByte;
|
||||
if( other.free )
|
||||
{
|
||||
// this is actually quite dangerous, but we need to do this
|
||||
// because these things are copied around inside idList
|
||||
other.free = false;
|
||||
}
|
||||
other.readp = NULL;
|
||||
other.endp = NULL;
|
||||
other.currentBit = 0;
|
||||
other.currentByte = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idSWFBitStream::Free
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
}
|
||||
|
||||
idSWFBitStream& operator=( idSWFBitStream& other );
|
||||
idSWFBitStream& operator=( idSWFBitStream&& other );
|
||||
|
||||
void Load( const byte* data, uint32 len, bool copy );
|
||||
void Free();
|
||||
|
|
|
@ -88,6 +88,32 @@ idSWFDictionaryEntry& idSWFDictionaryEntry::operator=( idSWFDictionaryEntry& oth
|
|||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idSWF::idSWFDictionaryEntry::operator= (move)
|
||||
========================
|
||||
*/
|
||||
idSWFDictionaryEntry& idSWFDictionaryEntry::operator=( idSWFDictionaryEntry&& other )
|
||||
{
|
||||
type = other.type;
|
||||
material = other.material;
|
||||
shape = other.shape;
|
||||
sprite = other.sprite;
|
||||
font = other.font;
|
||||
text = other.text;
|
||||
edittext = other.edittext;
|
||||
imageSize = other.imageSize;
|
||||
imageAtlasOffset = other.imageAtlasOffset;
|
||||
other.type = SWF_DICT_NULL;
|
||||
other.material = NULL;
|
||||
other.shape = NULL;
|
||||
other.sprite = NULL;
|
||||
other.font = NULL;
|
||||
other.text = NULL;
|
||||
other.edittext = NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idSWF::AddDictionaryEntry
|
||||
|
|
Loading…
Reference in a new issue