mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Merge pull request #709 from rtollert/rtollert-buildfixes
Build fixes tested on Kubuntu 22.04 with clang 14 and gcc 11. Thank you for your contribution!
This commit is contained in:
commit
56a10e7136
6 changed files with 70 additions and 4 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 )
|
||||
|
|
|
@ -2808,7 +2808,7 @@ fill_input_buffer( j_decompress_ptr cinfo )
|
|||
*/
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
METHODDEF()
|
||||
METHODDEF(void)
|
||||
#else
|
||||
METHODDEF void
|
||||
#endif
|
||||
|
@ -2836,7 +2836,7 @@ init_source( j_decompress_ptr cinfo )
|
|||
*/
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
METHODDEF()
|
||||
METHODDEF(void)
|
||||
#else
|
||||
METHODDEF void
|
||||
#endif
|
||||
|
@ -2876,7 +2876,7 @@ skip_input_data( j_decompress_ptr cinfo, long num_bytes )
|
|||
*/
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
METHODDEF()
|
||||
METHODDEF(void)
|
||||
#else
|
||||
METHODDEF void
|
||||
#endif
|
||||
|
@ -2887,7 +2887,7 @@ term_source( j_decompress_ptr cinfo )
|
|||
}
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
GLOBAL()
|
||||
GLOBAL(void)
|
||||
#else
|
||||
GLOBAL void
|
||||
#endif
|
||||
|
|
|
@ -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